public class TransactionImpl extends Object implements Transaction
Transaction.State| Constructor and Description |
|---|
TransactionImpl(TransactionManagerServiceImpl transactionManagerService,
NodeEngine nodeEngine,
TransactionOptions options,
String txOwnerUuid) |
TransactionImpl(TransactionManagerServiceImpl transactionManagerService,
NodeEngine nodeEngine,
TransactionOptions options,
String txOwnerUuid,
boolean originatedFromClient) |
| 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() |
boolean |
isOriginatedFromClient() |
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 TransactionImpl(TransactionManagerServiceImpl transactionManagerService, NodeEngine nodeEngine, TransactionOptions options, String txOwnerUuid, boolean originatedFromClient)
public String getTxnId()
getTxnId in interface Transactionpublic long getStartTime()
public String getOwnerUuid()
getOwnerUuid in interface Transactionpublic boolean isOriginatedFromClient()
isOriginatedFromClient in interface Transactionpublic Transaction.State getState()
getState in interface Transactionpublic long getTimeoutMillis()
getTimeoutMillis in interface Transactionprotected TransactionLog getTransactionLog()
public void add(TransactionLogRecord record)
add in interface Transactionpublic TransactionLogRecord get(Object key)
get in interface Transactionpublic void remove(Object key)
remove in interface Transactionpublic void begin()
throws IllegalStateException
begin in interface TransactionIllegalStateExceptionpublic void prepare()
throws TransactionException
prepare in interface TransactionTransactionExceptionpublic boolean requiresPrepare()
prepare() is required.public void commit()
throws TransactionException,
IllegalStateException
commit in interface TransactionTransactionExceptionIllegalStateExceptionpublic void rollback()
throws IllegalStateException
rollback in interface TransactionIllegalStateExceptionpublic void ensureBackupLogsExist()
protected CreateTxBackupLogOperation createCreateTxBackupLogOperation()
protected ReplicateTxBackupLogOperation createReplicateTxBackupLogOperation()
protected RollbackTxBackupLogOperation createRollbackTxBackupLogOperation()
protected PurgeTxBackupLogOperation createPurgeTxBackupLogOperation()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.