public class TransactionImpl extends Object implements Transaction
Transaction.State
Constructor and Description |
---|
TransactionImpl(TransactionManagerServiceImpl transactionManagerService,
NodeEngine nodeEngine,
TransactionOptions options,
String txOwnerUuid) |
Modifier and Type | Method and Description |
---|---|
void |
add(TransactionLogRecord record) |
void |
begin() |
void |
commit() |
protected CreateTxBackupLogOperation |
createCreateTxBackupLogOperation() |
protected PurgeTxBackupLogOperation |
createPurgeTxBackupLogOperation() |
protected ReplicateTxBackupLogOperation |
createReplicateTxBackupLogOperation() |
protected RollbackTxBackupLogOperation |
createRollbackTxBackupLogOperation() |
void |
ensureBackupLogsExist()
Some data-structures like the Transaction List rely on (empty) backup logs to be created before any change on the
data-structure is made.
|
TransactionLogRecord |
get(Object key) |
String |
getOwnerUuid() |
long |
getStartTime() |
Transaction.State |
getState() |
long |
getTimeoutMillis() |
protected TransactionLog |
getTransactionLog() |
String |
getTxnId() |
void |
prepare() |
void |
remove(Object key) |
boolean |
requiresPrepare()
Checks if this Transaction needs to be prepared.
|
void |
rollback() |
String |
toString() |
public TransactionImpl(TransactionManagerServiceImpl transactionManagerService, NodeEngine nodeEngine, TransactionOptions options, String txOwnerUuid)
public String getTxnId()
getTxnId
in interface Transaction
public long getStartTime()
public String getOwnerUuid()
getOwnerUuid
in interface Transaction
public Transaction.State getState()
getState
in interface Transaction
public long getTimeoutMillis()
getTimeoutMillis
in interface Transaction
protected TransactionLog getTransactionLog()
public void add(TransactionLogRecord record)
add
in interface Transaction
public TransactionLogRecord get(Object key)
get
in interface Transaction
public void remove(Object key)
remove
in interface Transaction
public void begin() throws IllegalStateException
begin
in interface Transaction
IllegalStateException
public void prepare() throws TransactionException
prepare
in interface Transaction
TransactionException
public boolean requiresPrepare()
prepare()
is required.public void commit() throws TransactionException, IllegalStateException
commit
in interface Transaction
TransactionException
IllegalStateException
public void rollback() throws IllegalStateException
rollback
in interface Transaction
IllegalStateException
public void ensureBackupLogsExist()
protected CreateTxBackupLogOperation createCreateTxBackupLogOperation()
protected ReplicateTxBackupLogOperation createReplicateTxBackupLogOperation()
protected RollbackTxBackupLogOperation createRollbackTxBackupLogOperation()
protected PurgeTxBackupLogOperation createPurgeTxBackupLogOperation()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.