public final class XATransaction extends Object implements Transaction
Transaction implementation.
This class does not need to be thread-safe, it is only used via XAResource
All visibility guarantees handled by XAResourceTransaction.State| Constructor and Description |
|---|
XATransaction(NodeEngine nodeEngine,
List<TransactionLogRecord> logs,
String txnId,
SerializableXID xid,
String txOwnerUuid,
long timeoutMillis,
long startTime) |
XATransaction(NodeEngine nodeEngine,
Xid xid,
String txOwnerUuid,
int timeout,
boolean originatedFromClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(TransactionLogRecord record) |
void |
begin() |
void |
commit() |
void |
commitAsync(ExecutionCallback callback) |
TransactionLogRecord |
get(Object key) |
String |
getOwnerUuid() |
long |
getStartTime() |
Transaction.State |
getState() |
long |
getTimeoutMillis() |
List<TransactionLogRecord> |
getTransactionRecords() |
String |
getTxnId() |
SerializableXID |
getXid() |
boolean |
isOriginatedFromClient() |
void |
prepare() |
void |
remove(Object key) |
void |
rollback() |
void |
rollbackAsync(ExecutionCallback callback) |
public XATransaction(NodeEngine nodeEngine, Xid xid, String txOwnerUuid, int timeout, boolean originatedFromClient)
public XATransaction(NodeEngine nodeEngine, List<TransactionLogRecord> logs, String txnId, SerializableXID xid, String txOwnerUuid, long timeoutMillis, long startTime)
public void begin()
throws IllegalStateException
begin in interface TransactionIllegalStateExceptionpublic void prepare()
throws TransactionException
prepare in interface TransactionTransactionExceptionpublic void commit()
throws TransactionException,
IllegalStateException
commit in interface TransactionTransactionExceptionIllegalStateExceptionpublic void commitAsync(ExecutionCallback callback)
public void rollback()
throws IllegalStateException
rollback in interface TransactionIllegalStateExceptionpublic void rollbackAsync(ExecutionCallback callback)
public String getTxnId()
getTxnId in interface Transactionpublic long getStartTime()
public List<TransactionLogRecord> getTransactionRecords()
public Transaction.State getState()
getState in interface Transactionpublic long getTimeoutMillis()
getTimeoutMillis in interface Transactionpublic void add(TransactionLogRecord record)
add in interface Transactionpublic void remove(Object key)
remove in interface Transactionpublic TransactionLogRecord get(Object key)
get in interface Transactionpublic String getOwnerUuid()
getOwnerUuid in interface Transactionpublic boolean isOriginatedFromClient()
isOriginatedFromClient in interface Transactionpublic SerializableXID getXid()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.