public interface LocalTransactionProvider extends TransactionProvider
| Modifier and Type | Field and Description |
|---|---|
static LocalTransactionProvider |
EMPTY
An empty provider which does not support new transactions.
|
| Modifier and Type | Method and Description |
|---|---|
Transaction |
createNewTransaction(int timeout)
Create and start a new local transaction, which is not associated with any particular thread.
|
Object |
getKey(Transaction transaction)
Get a key which has the same equals and hashCode behavior as the given transaction.
|
default String |
getNameFromXid(Xid xid)
Attempt to derive a node name from an XID.
|
String |
getNodeName()
Get the unique node name of this provider.
|
Object |
getResource(Transaction transaction,
Object key)
Get a resource associated with the given transaction.
|
boolean |
getRollbackOnly(Transaction transaction)
Determine if the given transaction is rollback-only.
|
TransactionManager |
getTransactionManager()
Get the transaction manager.
|
XAImporter |
getXAImporter()
Get the XA importer.
|
boolean |
isImported(Transaction transaction)
Determine whether the given transaction was imported or originated locally.
|
void |
putResource(Transaction transaction,
Object key,
Object value)
Put a resource on to the given transaction.
|
void |
registerInterposedSynchronization(Transaction transaction,
Synchronization sync)
Register an interposed synchronization on the given transaction.
|
static final LocalTransactionProvider EMPTY
@NotNull TransactionManager getTransactionManager()
null)@NotNull XAImporter getXAImporter()
null)@NotNull Transaction createNewTransaction(int timeout) throws SystemException, SecurityException
timeout - the timeout to use for the new transactionnull)SystemException - if the creation of the transaction failed for some reasonSecurityException - if the caller is not authorized to create a transactionboolean isImported(@NotNull
Transaction transaction)
throws IllegalArgumentException
transaction - the transaction to test (not null)true if the transaction was imported, or false if it was created locallyIllegalArgumentException - if the transaction does not belong to this providervoid registerInterposedSynchronization(@NotNull
Transaction transaction,
@NotNull
Synchronization sync)
throws IllegalArgumentException
transaction - the transaction (not null)sync - the synchronization (not null)IllegalArgumentException - if the transaction does not belong to this providerObject getResource(@NotNull Transaction transaction, @NotNull Object key)
transaction - the transaction (not null)key - the key to look up (not null)null if none is setIllegalArgumentException - if the transaction does not belong to this providervoid putResource(@NotNull
Transaction transaction,
@NotNull
Object key,
Object value)
throws IllegalArgumentException
transaction - the transaction (not null)key - the key to store under (not null)value - the value to storeIllegalArgumentException - if the transaction does not belong to this providerboolean getRollbackOnly(@NotNull
Transaction transaction)
throws IllegalArgumentException
transaction - the transaction (not null)true if the transaction is rollback-only, false otherwiseIllegalArgumentException - if the transaction does not belong to this provider@NotNull Object getKey(@NotNull Transaction transaction) throws IllegalArgumentException
transaction - the transaction (not null)null)IllegalArgumentException - if the transaction does not belong to this provider@NotNull String getNodeName()
null)Copyright © 2017 JBoss by Red Hat. All rights reserved.