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 XAResource
Transaction.State
Constructor and Description |
---|
XATransaction(NodeEngine nodeEngine,
Collection<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() |
Collection<TransactionLogRecord> |
getTransactionRecords() |
TransactionOptions.TransactionType |
getTransactionType() |
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, Collection<TransactionLogRecord> logs, String txnId, SerializableXID xid, String txOwnerUuid, long timeoutMillis, long startTime)
public void begin() throws IllegalStateException
begin
in interface Transaction
IllegalStateException
public void prepare() throws TransactionException
prepare
in interface Transaction
TransactionException
public void commit() throws TransactionException, IllegalStateException
commit
in interface Transaction
TransactionException
IllegalStateException
public void commitAsync(ExecutionCallback callback)
public void rollback() throws IllegalStateException
rollback
in interface Transaction
IllegalStateException
public void rollbackAsync(ExecutionCallback callback)
public String getTxnId()
getTxnId
in interface Transaction
public long getStartTime()
public Collection<TransactionLogRecord> getTransactionRecords()
public Transaction.State getState()
getState
in interface Transaction
public TransactionOptions.TransactionType getTransactionType()
getTransactionType
in interface Transaction
public long getTimeoutMillis()
getTimeoutMillis
in interface Transaction
public void add(TransactionLogRecord record)
add
in interface Transaction
public void remove(Object key)
remove
in interface Transaction
public TransactionLogRecord get(Object key)
get
in interface Transaction
public String getOwnerUuid()
getOwnerUuid
in interface Transaction
public boolean isOriginatedFromClient()
isOriginatedFromClient
in interface Transaction
public SerializableXID getXid()
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.