MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbTransaction.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  * NdbTransaction.java
19  */
20 
21 package com.mysql.ndbjtie.ndbapi;
22 
23 import java.nio.ByteBuffer;
24 
25 import com.mysql.jtie.Wrapper;
26 
27 public class NdbTransaction extends Wrapper implements NdbTransactionConst
28 {
29  public final native NdbErrorConst/*_const NdbError &_*/ getNdbError() /*_const_*/;
30  public final native NdbOperationConst/*_const NdbOperation *_*/ getNdbErrorOperation() /*_const_*/;
31  public final native NdbOperationConst/*_const NdbOperation *_*/ getNextCompletedOperation(NdbOperationConst/*_const NdbOperation *_*/ op) /*_const_*/;
32  public interface /*_enum_*/ ExecType
33  {
34  int NoExecTypeDef = -1 /*_::NoExecTypeDef,_*/,
35  Prepare = 0 /*_::Prepare,_*/,
36  NoCommit = 1 /*_::NoCommit,_*/,
37  Commit = 2 /*_::Commit,_*/,
38  Rollback = 3 /*_::Rollback_*/;
39  }
40  public final native NdbOperation/*_NdbOperation *_*/ getNdbOperation(NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ aTable);
41  public final native NdbScanOperation/*_NdbScanOperation *_*/ getNdbScanOperation(NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ aTable);
42  public final native NdbIndexScanOperation/*_NdbIndexScanOperation *_*/ getNdbIndexScanOperation(NdbDictionary.IndexConst/*_const NdbDictionary.Index *_*/ anIndex);
43  public final native NdbIndexOperation/*_NdbIndexOperation *_*/ getNdbIndexOperation(NdbDictionary.IndexConst/*_const NdbDictionary.Index *_*/ anIndex);
44  public final native int execute(int/*_NdbTransaction.ExecType_*/ execType, int/*_NdbOperation.AbortOption_*/ p0 /*_= NdbOperation.DefaultAbortOption_*/, int force /*_= 0_*/);
45  public final native int refresh();
46  public final native void close();
47  public final native int getGCI(long[]/*_Uint64 *_*/ gciptr);
48  public final native long/*_Uint64_*/ getTransactionId();
49  public interface /*_enum_*/ CommitStatusType
50  {
51  int NotStarted = 0 /*__*/,
52  Started = 1 /*__*/,
53  Committed = 2 /*__*/,
54  Aborted = 3 /*__*/,
55  NeedAbort = 4 /*__*/;
56  }
57  public final native int/*_CommitStatusType_*/ commitStatus();
58  public final native int getNdbErrorLine();
59  public final native NdbOperationConst/*_const NdbOperation *_*/ readTuple(NdbRecordConst/*_const NdbRecord *_*/ key_rec, ByteBuffer/*_const char *_*/ key_row, NdbRecordConst/*_const NdbRecord *_*/ result_rec, ByteBuffer/*_char *_*/ result_row, int/*_NdbOperation.LockMode_*/ lock_mode /*_= NdbOperation.LM_Read_*/, byte[]/*_const unsigned char *_*/ result_mask /*_= 0_*/, NdbOperation.OperationOptionsConst/*_const NdbOperation.OperationOptions *_*/ opts /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
60  public final native NdbOperationConst/*_const NdbOperation *_*/ insertTuple(NdbRecordConst/*_const NdbRecord *_*/ key_rec, ByteBuffer/*_const char *_*/ key_row, NdbRecordConst/*_const NdbRecord *_*/ attr_rec, ByteBuffer/*_const char *_*/ attr_row, byte[]/*_const unsigned char *_*/ mask /*_= 0_*/, NdbOperation.OperationOptionsConst/*_const NdbOperation.OperationOptions *_*/ opts /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
61  public final native NdbOperationConst/*_const NdbOperation *_*/ insertTuple(NdbRecordConst/*_const NdbRecord *_*/ combined_rec, ByteBuffer/*_const char *_*/ combined_row, byte[]/*_const unsigned char *_*/ mask /*_= 0_*/, NdbOperation.OperationOptionsConst/*_const NdbOperation.OperationOptions *_*/ opts /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
62  public final native NdbOperationConst/*_const NdbOperation *_*/ updateTuple(NdbRecordConst/*_const NdbRecord *_*/ key_rec, ByteBuffer/*_const char *_*/ key_row, NdbRecordConst/*_const NdbRecord *_*/ attr_rec, ByteBuffer/*_const char *_*/ attr_row, byte[]/*_const unsigned char *_*/ mask /*_= 0_*/, NdbOperation.OperationOptionsConst/*_const NdbOperation.OperationOptions *_*/ opts /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
63  public final native NdbOperationConst/*_const NdbOperation *_*/ writeTuple(NdbRecordConst/*_const NdbRecord *_*/ key_rec, ByteBuffer/*_const char *_*/ key_row, NdbRecordConst/*_const NdbRecord *_*/ attr_rec, ByteBuffer/*_const char *_*/ attr_row, byte[]/*_const unsigned char *_*/ mask /*_= 0_*/, NdbOperation.OperationOptionsConst/*_const NdbOperation.OperationOptions *_*/ opts /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
64  public final native NdbOperationConst/*_const NdbOperation *_*/ deleteTuple(NdbRecordConst/*_const NdbRecord *_*/ key_rec, ByteBuffer/*_const char *_*/ key_row, NdbRecordConst/*_const NdbRecord *_*/ result_rec, ByteBuffer/*_char *_*/ result_row /*_= 0_*/, byte[]/*_const unsigned char *_*/ result_mask /*_= 0_*/, NdbOperation.OperationOptionsConst/*_const NdbOperation.OperationOptions *_*/ opts /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
65  public final native NdbScanOperation/*_NdbScanOperation *_*/ scanTable(NdbRecordConst/*_const NdbRecord *_*/ result_record, int/*_NdbOperation.LockMode_*/ lock_mode /*_= NdbOperation.LM_Read_*/, byte[]/*_const unsigned char *_*/ result_mask /*_= 0_*/, NdbScanOperation.ScanOptionsConst/*_const NdbScanOperation.ScanOptions *_*/ options /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
66  public final native NdbIndexScanOperation/*_NdbIndexScanOperation *_*/ scanIndex(NdbRecordConst/*_const NdbRecord *_*/ key_record, NdbRecordConst/*_const NdbRecord *_*/ result_record, int/*_NdbOperation.LockMode_*/ lock_mode /*_= NdbOperation.LM_Read_*/, byte[]/*_const unsigned char *_*/ result_mask /*_= 0_*/, NdbIndexScanOperation.IndexBoundConst/*_const NdbIndexScanOperation.IndexBound *_*/ bound /*_= 0_*/, NdbScanOperation.ScanOptionsConst/*_const NdbScanOperation.ScanOptions *_*/ options /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
67  public final native NdbOperationConst/*_const NdbOperation *_*/ unlock(NdbLockHandleConst/*_const NdbLockHandle *_*/ lockHandle, int/*_NdbOperation::AbortOption_*/ ao /*_= NdbOperation::DefaultAbortOption_*/);
68  public final native int releaseLockHandle(NdbLockHandleConst/*_const NdbLockHandle *_*/ lockHandle);
69 }