f06f4090dad21461512c19a0e13818db61aac308
[packages/trusty/mysql-wsrep-5.6.git] /
1 /*
2    Copyright (c) 2009, 2011, 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 package com.mysql.clusterj.core.store;
19
20 import com.mysql.clusterj.LockMode;
21
22 /**
23  *
24  */
25 public interface ClusterTransaction {
26
27     public void close();
28
29     public void executeCommit();
30
31     public void executeCommit(boolean abort, boolean force);
32
33     public void executeNoCommit(boolean abort, boolean force);
34
35     public void executeNoCommit();
36
37     public void executeRollback();
38
39     public Operation getSelectOperation(Table storeTable);
40
41     public Operation getInsertOperation(Table storeTable);
42
43     public Operation getUpdateOperation(Table storeTable);
44
45     public Operation getWriteOperation(Table storeTable);
46
47     public Operation getDeleteOperation(Table storeTable);
48
49     public IndexOperation getUniqueIndexOperation(Index storeIndex, Table storeTable);
50
51     public IndexOperation getUniqueIndexDeleteOperation(Index storeIndex, Table storeTable);
52
53     public IndexScanOperation getIndexScanOperation(Index storeIndex, Table storeTable);
54
55     public IndexScanOperation getIndexScanOperationLockModeExclusiveScanFlagKeyInfo(Index storeIndex, Table storeTable);
56
57     public IndexScanOperation getIndexScanOperationMultiRange(Index storeIndex, Table storeTable);
58
59     public ScanOperation getTableScanOperation(Table storeTable);
60
61     public ScanOperation getTableScanOperationLockModeExclusiveScanFlagKeyInfo(Table storeTable);
62
63     public boolean isEnlisted();
64
65     public void setPartitionKey(PartitionKey partitionKey);
66
67     public String getCoordinatedTransactionId();
68
69     public void setCoordinatedTransactionId(String coordinatedTransactionId);
70
71     public void setLockMode(LockMode lockmode);
72
73     public void setAutocommit(boolean autocommit);
74
75     public void postExecuteCallback(Runnable postExecuteCallbackHandler);
76
77 }