public static class PseudoTxnMemoryChannel.NoOpTransaction extends Object implements Transaction
A no-op transaction implementation that does nothing at all.
Transaction.TransactionState| Constructor and Description |
|---|
NoOpTransaction() |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Starts a transaction boundary for the current channel operation.
|
void |
close()
Ends a transaction boundary for the current channel operation.
|
void |
commit()
Indicates that the transaction can be successfully committed.
|
void |
rollback()
Indicates that the transaction can must be aborted.
|
static Transaction |
sharedInstance() |
public static Transaction sharedInstance()
public void begin()
TransactionStarts a transaction boundary for the current channel operation. If a transaction is already in progress, this method will join that transaction using reference counting.
Note: For every invocation of this method there must be a corresponding invocation of Transaction.close() method. Failure to ensure this can lead to dangling transactions and unpredictable results.
begin in interface Transactionpublic void commit()
Transactioncommit in interface Transactionpublic void rollback()
Transactionrollback in interface Transactionpublic void close()
TransactionEnds a transaction boundary for the current channel operation. If a transaction is already in progress, this method will join that transaction using reference counting. The transaction is completed only if there are no more references left for this transaction.
Note: For every invocation of this method there must be a corresponding invocation of Transaction.begin() method. Failure to ensure this can lead to dangling transactions and unpredictable results.
close in interface TransactionCopyright © 2009-2022 Apache Software Foundation. All Rights Reserved.