#At https://bazaar.launchpad.net/~ndb-bindings/ndb-bindings/trunk
435 Monty Taylor 2008-06-30
Added NdbTransaction.executeAsynch, which sends immediately.
modified:
interface/ndbapi/NdbTransaction.i
java/com/mysql/cluster/ndbj/NdbTransaction.java
=== modified file 'interface/ndbapi/NdbTransaction.i'
--- a/interface/ndbapi/NdbTransaction.i 2008-06-30 13:58:59 +0000
+++ b/interface/ndbapi/NdbTransaction.i 2008-06-30 14:05:59 +0000
@@ -135,6 +135,16 @@ public:
self->executeAsynchPrepare(execType,theCallBack,(void *)cb, abortOption);
}
+ void executeAsynch(NdbTransaction::ExecType execType,
+ asynch_callback_t * cb,
+ NdbOperation::AbortOption abortOption
+ = NdbOperation::DefaultAbortOption,
+ bool forceSend=false) {
+ cb->create_time=getMicroTime();
+ self->executeAsynch(execType,theCallBack,(void *)cb,
+ abortOption, forceSend);
+ }
+
%ndbexception("NdbApiException,NdbApiTemporaryException,"
"NdbApiPermanentException,") {
$action
=== modified file 'java/com/mysql/cluster/ndbj/NdbTransaction.java'
--- a/java/com/mysql/cluster/ndbj/NdbTransaction.java 2008-06-30 13:29:41 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbTransaction.java 2008-06-30 14:05:59 +0000
@@ -406,6 +406,45 @@ public interface NdbTransaction extends
*/
void executeAsynchPrepare(ExecType execType, BaseCallback callback);
+ /**
+ * Prepare an asynchronous transaction and send it immediately.
+ *
+ * @param execType
+ * {@link #execute(ExecType)}
+ * @param callback
+ * A callback object. This handleCallback method of this object
+ * gets called when the transaction has been executed.
+ * @param abortOption
+ * see {@link #execute(ExecType, AbortOption)}
+ * @param forceSend
+ * Send immediately skipping the adaptive send buffer
+ */
+ public void executeAsynch(NdbTransaction.ExecType execType, BaseCallback cb,
NdbOperation.AbortOption abortOption, boolean forceSend);
+
+ /**
+ * Prepare an asynchronous transaction and send it immediately.
+ *
+ * @param execType
+ * {@link #execute(ExecType)}
+ * @param callback
+ * A callback object. This handleCallback method of this object
+ * gets called when the transaction has been executed.
+ * @param abortOption
+ * see {@link #execute(ExecType, AbortOption)}
+ */
+ public void executeAsynch(NdbTransaction.ExecType execType, BaseCallback cb,
NdbOperation.AbortOption abortOption);
+
+ /**
+ * Prepare an asynchronous transaction and send it immediately.
+ *
+ * @param execType
+ * {@link #execute(ExecType)}
+ * @param callback
+ * A callback object. This handleCallback method of this object
+ * gets called when the transaction has been executed.
+ */
+ public void executeAsynch(NdbTransaction.ExecType execType, BaseCallback cb);
+
int executeNoCommit(AbortOption abortOption) throws NdbApiException,
NdbApiTemporaryException, NdbApiPermanentException;
@@ -424,4 +463,5 @@ public interface NdbTransaction extends
int executeRollback() throws NdbApiException,
NdbApiTemporaryException, NdbApiPermanentException;
+
}
| Thread |
|---|
| • bzr commit into NDB/Bindings:trunk branch (monty:435) | Monty Taylor | 30 Jun |