List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:October 10 2007 8:44pm
Subject:Rev 175: Removed references to *Ref in Ndb.java in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge

------------------------------------------------------------
revno: 175
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Wed 2007-10-10 13:43:37 -0700
message:
  Removed references to *Ref in Ndb.java
  Added NdbTable versions of startTransaction()
modified:
  java/com/mysql/cluster/ndbj/Ndb.java ndb.java-20070517181935-98huwjarzuh25b30-2
  swig/Ndb.i                     ndb.i-20070228021421-qkr4cbpxymyqdrf3-1
=== modified file 'java/com/mysql/cluster/ndbj/Ndb.java'
--- a/java/com/mysql/cluster/ndbj/Ndb.java	2007-10-05 18:18:53 +0000
+++ b/java/com/mysql/cluster/ndbj/Ndb.java	2007-10-10 20:43:37 +0000
@@ -5,19 +5,19 @@
 /**
 *
 * This class represents the NDB kernel; it is the primary class of the NDB API.
-* <br>An <code>NdbRef</code> object is used to create transaction
objects for use on a specific database.
+* <br>An <code>Ndb</code> object is used to create transaction objects
for use on a specific database.
 * They are constructed using: a <code>NdbClusterConnectionImpl</code> object;
the name of the database schema to be accessed;
-* and the maximum number of transactions that will be created using the
<code>NdbRef</code> object.
- * <br>You must call the close() method on the <code>NdbRef</code>
object when you have finished using
+* and the maximum number of transactions that will be created using the
<code>Ndb</code> object.
+ * <br>You must call the close() method on the <code>Ndb</code> object
when you have finished using
 * it to free JNI resources.
-* <br><code>NdbRef</code> objects are not thread-safe. Howver, it is
possible to implement a multi-threaded application
-* using a single, non-shared <code>NdbRef</code> object per thread or by
providing synchronised access to a shared <code>NdbRef</code> object.
-* <br>A single application can support a maximum of 128
<code>NdbRef</code> objects.
+* <br><code>Ndb</code> objects are not thread-safe. Howver, it is
possible to implement a multi-threaded application
+* using a single, non-shared <code>Ndb</code> object per thread or by
providing synchronised access to a shared <code>Ndb</code> object.
+* <br>A single application can support a maximum of 128
<code>Ndb</code> objects.
 *
 * <br>Sample Code:<br>
 * <code>
 *      NdbClusterConnectionImpl connRef=null;<br>
-*      NdbRef ndb=null;<br>
+*      Ndb ndb=null;<br>
 *      try {<br>
 *          connRef =
NdbFactoryRef.createNdbClusterConnection("ndb-connectstring");<br>
 *          ndb = connRef.createNdb("database");<br>
@@ -36,7 +36,7 @@
 * }<br>
 *</code>
 * @see      NdbClusterConnectionImpl
-* @see      NdbTransactionRef
+* @see      NdbTransaction
 */
 public interface Ndb
 {
@@ -44,31 +44,31 @@
     /**
      *
      * @param maxNumberOfTransactions This parameter specifies the maximum number of
parallel
-     * NdbTransactionRef objects that can be handled by this instance of NdbRef.
+     * NdbTransaction objects that can be handled by this instance of Ndb.
      * The maximum permitted value for maxNoOfTransactions is 1024;
-     * if not specified Note each scan or index operation uses an extra NdbTransactionRef
object.
+     * if not specified Note each scan or index operation uses an extra NdbTransaction
object.
      * @throws NdbApiException if an error occured in the native library
      * @throws IllegalStateException if the close method has already been called on the
object.
      */
     public abstract int init(int maxNumberOfTransactions) throws NdbApiException;
 
     /**
-     * Creates a NdbTransactionRef object that can be used to create
-     * an NdbOperationRef object for reading, inserting and updating
+     * Creates a NdbTransaction object that can be used to create
+     * an NdbOperation object for reading, inserting and updating
      * rows in a schema.
      * When no schema is specfied, the transaction object will be started
      * on a random node in the cluster.
-     * @return an NdbTransactionRef object
+     * @return an NdbTransaction object
      * @throws NdbApiException if an error occured in the native library
      * @throws IllegalStateException if the close method has already been called on the
object.
-     * @see NdbTransactionRef
-     * @see NdbOperationRef
+     * @see NdbTransaction
+     * @see NdbOperation
      */
     public abstract NdbTransaction startTransaction() throws NdbApiException;
 
     /**
-     * Creates a NdbTransactionRef object that can be used to create
-     * an NdbOperationRef object for reading, inserting and updating
+     * Creates a NdbTransaction object that can be used to create
+     * an NdbOperation object for reading, inserting and updating
      * rows in a schema.
      * The schema name and distribution key provide a hint as to where to start the
transaction.
      * The transaction should start on the node where the data is located, removing a
potential
@@ -76,17 +76,17 @@
      *
      * @param tableName schema name used for deciding which node to run the Transaction
Coordinator on
      * @param distkey partition key corresponding to table
-     * @return an NdbTransactionRef object
+     * @return an NdbTransaction object
      * @throws NdbApiException if an error occured in the native library
      * @throws IllegalStateException if the close method has already been called on the
object.
-     * @see NdbTransactionRef
+     * @see NdbTransaction
      */
     public abstract NdbTransaction startTransaction(String tableName, String distkey)
throws NdbApiException;
 
     /**
      *
-     * Creates a NdbTransactionRef object that can be used to create
-     * an NdbOperationRef object for reading, inserting and updating
+     * Creates a NdbTransaction object that can be used to create
+     * an NdbOperation object for reading, inserting and updating
      * rows in a schema.
      * The schema name and distribution key provide a hint as to where to start the
transaction.
      * The transaction should start on the node where the data is located, removing a
potential
@@ -94,15 +94,15 @@
      *
      * @param tableName schema name used for deciding which node to run the Transaction
Coordinator on
      * @param distkey partition key corresponding to table
-     * @return an NdbTransactionRef object
+     * @return an NdbTransaction object
      * @throws NdbApiException if an error occured in the native library
      * @throws IllegalStateException if the close method has already been called on the
object.
-     * @see NdbTransactionRef
+     * @see NdbTransaction
      */
     public abstract NdbTransaction startTransaction(String tableName, int distkey) throws
NdbApiException;
 
     /**
-     * Call this method when the NdbRef object is no longer required
+     * Call this method when the Ndb object is no longer required
      * to free up memory allocated in the underlying native library.
      * <br>Often, this is done by calling close in a finally clause after the scope
of where the
      * ndb object is used.
@@ -114,4 +114,12 @@
     public abstract int sendPollNdb(int aMillisecondNumber) throws NdbApiException;
 
 	public NdbDictionary getDictionary() throws NdbApiException;
+
+	public int dropEventOperation(NdbEventOperationImpl eventOp) throws NdbApiException;
+
+	public NdbTransaction startTransaction(NdbTable table, String keyData) throws
NdbApiException;
+
+	public NdbEventOperation createEventOperation(String eventName) throws NdbApiException;
+
+	public NdbTransaction startTransaction(NdbTable table, int keyData) throws
NdbApiException;
 }
\ No newline at end of file

=== modified file 'swig/Ndb.i'
--- a/swig/Ndb.i	2007-10-05 19:46:08 +0000
+++ b/swig/Ndb.i	2007-10-10 20:43:37 +0000
@@ -148,6 +148,10 @@
     const NdbDictTable *myTable = myDict->getTable(aTableName);
     return self->startTransaction(myTable,(const char *) &keyData);
   }
+  NdbTransaction* startTransaction(const NdbDictTable* table, 
+                                   int keyData) {
+    return self->startTransaction(table,(const char *) &keyData);
+  }
 
   %ndbnoexception; 
 

Thread
Rev 175: Removed references to *Ref in Ndb.java in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmergeMonty Taylor10 Oct