|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.mvstore.db.TransactionStore.Transaction
public static class TransactionStore.Transaction
A transaction.
Field Summary | |
---|---|
static int |
STATUS_CLOSED
The status of a closed transaction (committed or rolled back). |
static int |
STATUS_COMMITTING
The status of a transaction that is being committed, but possibly not yet finished. |
static int |
STATUS_OPEN
The status of an open transaction. |
static int |
STATUS_PREPARED
The status of a prepared transaction. |
Method Summary | ||
---|---|---|
void |
commit()
Commit the transaction. |
|
java.util.Iterator<TransactionStore.Change> |
getChanges(long savepointId)
Get the list of changes, starting with the latest change, up to the given savepoint (in reverse order than they occurred). |
|
int |
getId()
|
|
java.lang.String |
getName()
|
|
int |
getStatus()
|
|
|
openMap(MVMap<K,org.h2.mvstore.db.TransactionStore.VersionedValue> map)
Open the transactional version of the given map. |
|
|
openMap(java.lang.String name)
Open a data map. |
|
|
openMap(java.lang.String name,
DataType keyType,
DataType valueType)
Open the map to store the data. |
|
void |
prepare()
Prepare the transaction. |
|
|
removeMap(TransactionStore.TransactionMap<K,V> map)
Remove the map. |
|
void |
rollback()
Roll the transaction back. |
|
void |
rollbackToSavepoint(long savepointId)
Roll back to the given savepoint. |
|
void |
setName(java.lang.String name)
|
|
long |
setSavepoint()
Create a new savepoint. |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int STATUS_CLOSED
public static final int STATUS_OPEN
public static final int STATUS_PREPARED
public static final int STATUS_COMMITTING
Method Detail |
---|
public int getId()
public int getStatus()
public void setName(java.lang.String name)
public java.lang.String getName()
public long setSavepoint()
public <K,V> TransactionStore.TransactionMap<K,V> openMap(java.lang.String name)
K
- the key typeV
- the value typename
- the name of the map
public <K,V> TransactionStore.TransactionMap<K,V> openMap(java.lang.String name, DataType keyType, DataType valueType)
K
- the key typeV
- the value typename
- the name of the mapkeyType
- the key data typevalueType
- the value data type
public <K,V> TransactionStore.TransactionMap<K,V> openMap(MVMap<K,org.h2.mvstore.db.TransactionStore.VersionedValue> map)
K
- the key typeV
- the value typemap
- the base map
public void prepare()
public void commit()
public void rollbackToSavepoint(long savepointId)
savepointId
- the savepoint idpublic void rollback()
public java.util.Iterator<TransactionStore.Change> getChanges(long savepointId)
savepointId
- the savepoint id, 0 meaning the beginning of the
transaction
public <K,V> void removeMap(TransactionStore.TransactionMap<K,V> map)
map
- the mappublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |