1 /*
2    Copyright (c) 2009, 2021, Oracle and/or its affiliates.
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, version 2.0,
6    as published by the Free Software Foundation.
7 
8    This program is also distributed with certain software (including
9    but not limited to OpenSSL) that is licensed under separate terms,
10    as designated in a particular file or component or in included license
11    documentation.  The authors of MySQL hereby grant you an additional
12    permission to link the program and your derivative works with the
13    separately licensed software that they have included with MySQL.
14 
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License, version 2.0, for more details.
19 
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
23 */
24 
25 package com.mysql.clusterj.core.store;
26 
27 import com.mysql.clusterj.LockMode;
28 
29 /**
30  *
31  */
32 public interface ClusterTransaction {
33 
close()34     public void close();
35 
executeCommit()36     public void executeCommit();
37 
executeCommit(boolean abort, boolean force)38     public void executeCommit(boolean abort, boolean force);
39 
executeNoCommit(boolean abort, boolean force)40     public void executeNoCommit(boolean abort, boolean force);
41 
executeNoCommit()42     public void executeNoCommit();
43 
executeRollback()44     public void executeRollback();
45 
getSelectOperation(Table storeTable)46     public Operation getSelectOperation(Table storeTable);
47 
getInsertOperation(Table storeTable)48     public Operation getInsertOperation(Table storeTable);
49 
getUpdateOperation(Table storeTable)50     public Operation getUpdateOperation(Table storeTable);
51 
getWriteOperation(Table storeTable)52     public Operation getWriteOperation(Table storeTable);
53 
getDeleteOperation(Table storeTable)54     public Operation getDeleteOperation(Table storeTable);
55 
getUniqueIndexOperation(Index storeIndex, Table storeTable)56     public IndexOperation getUniqueIndexOperation(Index storeIndex, Table storeTable);
57 
getUniqueIndexDeleteOperation(Index storeIndex, Table storeTable)58     public IndexOperation getUniqueIndexDeleteOperation(Index storeIndex, Table storeTable);
59 
getUniqueIndexUpdateOperation(Index storeIndex, Table storeTable)60     public IndexOperation getUniqueIndexUpdateOperation(Index storeIndex, Table storeTable);
61 
getIndexScanOperation(Index storeIndex, Table storeTable)62     public IndexScanOperation getIndexScanOperation(Index storeIndex, Table storeTable);
63 
getIndexScanOperationLockModeExclusiveScanFlagKeyInfo(Index storeIndex, Table storeTable)64     public IndexScanOperation getIndexScanOperationLockModeExclusiveScanFlagKeyInfo(Index storeIndex, Table storeTable);
65 
getIndexScanOperationMultiRange(Index storeIndex, Table storeTable)66     public IndexScanOperation getIndexScanOperationMultiRange(Index storeIndex, Table storeTable);
67 
getTableScanOperation(Table storeTable)68     public ScanOperation getTableScanOperation(Table storeTable);
69 
getTableScanOperationLockModeExclusiveScanFlagKeyInfo(Table storeTable)70     public ScanOperation getTableScanOperationLockModeExclusiveScanFlagKeyInfo(Table storeTable);
71 
isEnlisted()72     public boolean isEnlisted();
73 
setPartitionKey(PartitionKey partitionKey)74     public void setPartitionKey(PartitionKey partitionKey);
75 
getCoordinatedTransactionId()76     public String getCoordinatedTransactionId();
77 
setCoordinatedTransactionId(String coordinatedTransactionId)78     public void setCoordinatedTransactionId(String coordinatedTransactionId);
79 
setLockMode(LockMode lockmode)80     public void setLockMode(LockMode lockmode);
81 
setAutocommit(boolean autocommit)82     public void setAutocommit(boolean autocommit);
83 
postExecuteCallback(Runnable postExecuteCallbackHandler)84     public void postExecuteCallback(Runnable postExecuteCallbackHandler);
85 
86 }
87