]> review.fuel-infra Code Review - packages/trusty/mysql-wsrep-5.6.git/blob
4d822d6974e7f7d214c9005a8e7bb6d685216124
[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.spi;
19
20 import com.mysql.clusterj.Session;
21 import com.mysql.clusterj.core.store.Dictionary;
22 import com.mysql.clusterj.core.store.Index;
23 import com.mysql.clusterj.core.store.IndexOperation;
24 import com.mysql.clusterj.core.store.IndexScanOperation;
25 import com.mysql.clusterj.core.store.Operation;
26 import com.mysql.clusterj.core.store.ResultData;
27 import com.mysql.clusterj.core.store.ScanOperation;
28 import com.mysql.clusterj.core.store.Table;
29 import com.mysql.clusterj.query.QueryDomainType;
30
31 import java.util.BitSet;
32
33 /**
34  *
35  */
36 public interface SessionSPI extends Session {
37
38     <T> T initializeFromDatabase(
39             DomainTypeHandler<T> domainTypeHandler, T object,
40             ValueHandler valueHandler, ValueHandler createKeyValueHandler);
41
42     public ResultData selectUnique(DomainTypeHandler<?> domainTypeHandler,
43             ValueHandler keyHandler, BitSet fields);
44
45     Operation insert(DomainTypeHandler<?> domainTypeHandler, ValueHandler valueHandler);
46
47     Operation update(DomainTypeHandler<?> domainTypeHandler, ValueHandler valueHandler);
48
49     Operation delete(DomainTypeHandler<?> domainTypeHandler, ValueHandler valueHandler);
50
51     int deletePersistentAll(DomainTypeHandler<?> domainTypeHandler);
52
53     int deletePersistentAll(ScanOperation op, boolean abort);
54
55     void begin();
56
57     void commit();
58
59     void rollback();
60
61     void setRollbackOnly();
62
63     boolean getRollbackOnly();
64
65     void startAutoTransaction();
66
67     void endAutoTransaction();
68
69     void failAutoTransaction();
70
71     void executeNoCommit();
72
73     void executeNoCommit(boolean abort, boolean force);
74
75     Operation getSelectOperation(Table storeTable);
76
77     Operation getDeleteOperation(Table storeTable);
78
79     IndexOperation getUniqueIndexOperation(Index storeIndex, Table storeTable);
80
81     IndexOperation getUniqueIndexDeleteOperation(Index storeIndex, Table storeTable);
82
83     IndexScanOperation getIndexScanOperation(Index storeIndex, Table storeTable);
84
85     IndexScanOperation getIndexScanDeleteOperation(Index storeIndex, Table storeTable);
86
87     IndexScanOperation getIndexScanOperationMultiRange(Index storeIndex, Table storeTable);
88
89     ScanOperation getTableScanOperation(Table storeTable);
90
91     ScanOperation getTableScanDeleteOperation(Table storeTable);
92
93     Dictionary getDictionary();
94
95     <T> QueryDomainType<T> createQueryDomainType(DomainTypeHandler<T> handler);
96
97     String getCoordinatedTransactionId();
98
99     void setCoordinatedTransactionId(String coordinatedTransactionId);
100
101     boolean isEnlisted();
102
103 }