A transaction.
| Methods |
| void |
checkNotClosed()
Check whether this transaction is open or prepared.
|
| void |
checkNotClosed()
Check whether this transaction is open or prepared.
|
| void |
commit()
Commit the transaction.
|
| void |
commit()
Commit the transaction. Afterwards, this transaction is closed.
|
| Iterator |
getChanges(long savepointId)
Get the list of changes, starting with the latest change, up to the
given savepoint (in reverse order than they occurred).
|
| Iterator |
getChanges(long savepointId)
Get the list of changes, starting with the latest change, up to the
given savepoint (in reverse order than they occurred). The value of
the change is the value before the change was applied.
Parameters:
savepointId - the savepoint id, 0 meaning the beginning of the
transaction
Returns:
the changes
|
| int |
getId()
|
| int |
getId()
|
| String |
getName()
|
| String |
getName()
|
| int |
getStatus()
|
| int |
getStatus()
|
| void |
log(int mapId, Object key, Object oldValue)
Add a log entry.
|
| void |
log(int mapId, Object key, Object oldValue)
Add a log entry.
Parameters:
mapId - the map id
key - the key
oldValue - the old value
|
| void |
logUndo()
Remove the last log entry.
|
| void |
logUndo()
Remove the last log entry.
|
| TransactionStore.TransactionMap |
openMap(String name)
Open a data map.
|
| TransactionStore.TransactionMap |
openMap(String name)
Open a data map.
Parameters:
name - the name of the map
Returns:
the transaction map
|
| TransactionStore.TransactionMap |
openMap(String name, DataType keyType, DataType valueType)
Open the map to store the data.
|
| TransactionStore.TransactionMap |
openMap(String name, DataType keyType, DataType valueType)
Open the map to store the data.
Parameters:
name - the name of the map
keyType - the key data type
valueType - the value data type
Returns:
the transaction map
|
| TransactionStore.TransactionMap |
openMap(MVMap map)
Open the transactional version of the given map.
|
| TransactionStore.TransactionMap |
openMap(MVMap map)
Open the transactional version of the given map.
Parameters:
map - the base map
Returns:
the transactional map
|
| void |
prepare()
Prepare the transaction.
|
| void |
prepare()
Prepare the transaction. Afterwards, the transaction can only be
committed or rolled back.
|
| void |
removeMap(TransactionStore.TransactionMap map)
Remove the map.
|
| void |
removeMap(TransactionStore.TransactionMap map)
Remove the map.
Parameters:
map - the map
|
| void |
rollback()
Roll the transaction back.
|
| void |
rollback()
Roll the transaction back. Afterwards, this transaction is closed.
|
| void |
rollbackToSavepoint(long savepointId)
Roll back to the given savepoint.
|
| void |
rollbackToSavepoint(long savepointId)
Roll back to the given savepoint. This is only allowed if the
transaction is open.
Parameters:
savepointId - the savepoint id
|
| void |
setName(String name)
|
| void |
setName(String name)
|
| long |
setSavepoint()
Create a new savepoint.
|
| long |
setSavepoint()
Create a new savepoint.
Returns:
the savepoint id
|
| void |
setStatus(int status)
|
| void |
setStatus(int status)
|
| String |
toString()
|
| String |
toString()
|
The status of a closed transaction (committed or rolled back).
The status of an open transaction.
The status of a prepared transaction.
The status of a transaction that is being committed, but possibly not
yet finished. A transactions can go into this state when the store is
closed while the transaction is committing. When opening a store,
such transactions should be committed.
The log id of the last entry in the undo log map.
The transaction store.
The transaction id.