MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ndb.java
1 /*
2  Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 /*
18  * Ndb.java
19  */
20 
21 package com.mysql.ndbjtie.ndbapi;
22 
23 import java.nio.ByteBuffer;
24 
25 import com.mysql.jtie.Wrapper;
26 import com.mysql.jtie.ArrayWrapper;
27 
28 public class Ndb extends Wrapper implements NdbConst
29 {
30  public final native String/*_const char *_*/ getDatabaseName() /*_const_*/;
31  public final native String/*_const char *_*/ getDatabaseSchemaName() /*_const_*/;
32  public final native NdbDictionary.Dictionary/*_NdbDictionary.Dictionary *_*/ getDictionary() /*_const_*/;
33  public final native NdbErrorConst/*_const NdbError &_*/ getNdbError() /*_const_*/;
34  public final native String/*_const char *_*/ getNdbErrorDetail(NdbErrorConst/*_const NdbError &_*/ err, ByteBuffer /*_char *_*/ buff, int/*_Uint32_*/ buffLen) /*_const_*/;
35  static public final native Ndb create(Ndb_cluster_connection/*_Ndb_cluster_connection *_*/ ndb_cluster_connection, String/*_const char *_*/ aCatalogName /*_= ""_*/, String/*_const char *_*/ aSchemaName /*_= "def"_*/);
36  static public final native void delete(Ndb p0);
37  public final native int setDatabaseName(String/*_const char *_*/ aDatabaseName);
38  public final native int setDatabaseSchemaName(String/*_const char *_*/ aDatabaseSchemaName);
39  public final native int init(int maxNoOfTransactions /*_= 4_*/);
40  public final native NdbEventOperation/*_NdbEventOperation *_*/ createEventOperation(String/*_const char *_*/ eventName);
41  public final native int dropEventOperation(NdbEventOperation/*_NdbEventOperation *_*/ eventOp);
42  public final native int pollEvents(int aMillisecondNumber, long[]/*_Uint64 *_*/ latestGCI /*_= 0_*/);
43  public final native NdbEventOperation/*_NdbEventOperation *_*/ nextEvent();
44  public final native boolean isConsistent(long[]/*_Uint64 &_*/ gci);
45  public final native boolean isConsistentGCI(long/*_Uint64_*/ gci);
46  public final native NdbEventOperationConst/*_const NdbEventOperation *_*/ getGCIEventOperations(int[]/*_Uint32 *_*/ iter, int[]/*_Uint32 *_*/ event_types);
47  public final native NdbTransaction/*_NdbTransaction *_*/ startTransaction(NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ table /*_= 0_*/, ByteBuffer/*_const char *_*/ keyData /*_= 0_*/, int/*_Uint32_*/ keyLen /*_= 0_*/);
48  static public interface Key_part_ptrConstArray extends ArrayWrapper< Key_part_ptrConst >
49  {
50  }
51  static public class Key_part_ptrArray extends Wrapper implements Key_part_ptrConstArray
52  {
53  static public native Key_part_ptrArray create(int length);
54  static public native void delete(Key_part_ptrArray e);
55  public native Key_part_ptr at(int i);
56  }
57  public interface /*_struct_*/ Key_part_ptrConst
58  {
59  // MMM! support <out:BB> or check if needed: ByteBuffer/*_const void *_*/ ptr();
60  int/*_unsigned_*/ len();
61  }
62  static public class /*_struct_*/ Key_part_ptr extends Wrapper implements Key_part_ptrConst
63  {
64  // MMM! support <out:BB> or check if needed: public final native ByteBuffer/*_const void *_*/ ptr();
65  public final native int/*_unsigned_*/ len();
66  public final native void ptr(ByteBuffer/*_const void *_*/ p0);
67  public final native void len(int/*_unsigned_*/ p0);
68  static public final native Key_part_ptr create();
69  static public final native void delete(Key_part_ptr p0);
70  }
71  public final native NdbTransaction/*_NdbTransaction *_*/ startTransaction(NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ table, Key_part_ptrConstArray/*_const Key_part_ptr *_*/ keyData, ByteBuffer/*_void *_*/ xfrmbuf /*_= 0_*/, int/*_Uint32_*/ xfrmbuflen /*_= 0_*/);
72  public final native NdbTransaction/*_NdbTransaction *_*/ startTransaction(NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ table, int/*_Uint32_*/ partitionId);
73  static public final native int computeHash(int[]/*_Uint32 *_*/ hashvalueptr, NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ p0, Key_part_ptrConstArray/*_const Key_part_ptr *_*/ keyData, ByteBuffer/*_void *_*/ xfrmbuf /*_= 0_*/, int/*_Uint32_*/ xfrmbuflen /*_= 0_*/);
74  public final native void closeTransaction(NdbTransaction/*_NdbTransaction *_*/ p0);
75  public final native NdbErrorConst/*_const NdbError &_*/ getNdbError(int errorCode);
76 }