public abstract class JBossLocalTransactionProvider extends Object implements LocalTransactionProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
JBossLocalTransactionProvider.Builder
A builder for a JBoss local transaction provider.
|
EMPTY| Modifier and Type | Method and Description |
|---|---|
static JBossLocalTransactionProvider.Builder |
builder()
Create a builder for the transaction provider.
|
Transaction |
createNewTransaction(int timeout)
Create and start a new local transaction, which is not associated with any particular thread.
|
void |
dropLocal(Transaction transaction)
Drop a local transaction from memory.
|
abstract Object |
getKey(Transaction transaction)
Get a key which has the same equals and hashCode behavior as the given transaction.
|
String |
getNameFromXid(Xid xid)
Attempt to derive a node name from an XID.
|
String |
getNodeName()
Get the unique node name of this provider.
|
<T> T |
getProviderInterface(Transaction transaction,
Class<T> providerInterfaceType)
Attempt to acquire a provider interface instance from the given provider transaction.
|
abstract int |
getTimeout(Transaction transaction)
Get the configured timeout of the given transaction (not the remaining time).
|
TransactionManager |
getTransactionManager()
Get the transaction manager.
|
XAImporter |
getXAImporter()
Get the XA importer.
|
XAResourceRegistry |
getXAResourceRegistry(LocalTransaction transaction)
Return the XAResource registry associated with
transaction. |
abstract Xid |
getXid(Transaction transaction)
Get the transaction ID of the given transaction.
|
boolean |
isImported(Transaction transaction)
Determine whether the given transaction was imported or originated locally.
|
abstract void |
registerInterposedSynchronization(Transaction transaction,
Synchronization sync)
Register an interposed synchronization on the given transaction.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcommitLocal, getResource, getRollbackOnly, putResource, putResourceIfAbsent, rollbackLocalpublic static JBossLocalTransactionProvider.Builder builder()
@NotNull public TransactionManager getTransactionManager()
LocalTransactionProvidergetTransactionManager in interface LocalTransactionProvidernull)@NotNull public XAImporter getXAImporter()
LocalTransactionProvidergetXAImporter in interface LocalTransactionProvidernull)@NotNull public Transaction createNewTransaction(int timeout) throws SystemException, SecurityException
LocalTransactionProvidercreateNewTransaction in interface LocalTransactionProvidertimeout - 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 transactionpublic XAResourceRegistry getXAResourceRegistry(LocalTransaction transaction) throws SystemException
LocalTransactionProvidertransaction. If there is no such
registry yet, one is created.getXAResourceRegistry in interface LocalTransactionProvidertransaction - the transactiontransaction. Can return null if this
provider requires no XAResource registrySystemExceptionpublic boolean isImported(@NotNull
Transaction transaction)
throws IllegalArgumentException
LocalTransactionProviderisImported in interface LocalTransactionProvidertransaction - 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 providerpublic abstract void registerInterposedSynchronization(@NotNull
Transaction transaction,
@NotNull
Synchronization sync)
throws IllegalArgumentException
LocalTransactionProviderregisterInterposedSynchronization in interface LocalTransactionProvidertransaction - the transaction (not null)sync - the synchronization (not null)IllegalArgumentException - if the transaction does not belong to this provider@NotNull public abstract Object getKey(@NotNull Transaction transaction) throws IllegalArgumentException
LocalTransactionProvidergetKey in interface LocalTransactionProvidertransaction - the transaction (not null)null)IllegalArgumentException - if the transaction does not belong to this providerpublic void dropLocal(@NotNull
Transaction transaction)
LocalTransactionProviderdropLocal in interface LocalTransactionProvidertransaction - the transaction to drop (not null)public abstract int getTimeout(@NotNull
Transaction transaction)
LocalTransactionProvidergetTimeout in interface LocalTransactionProvidertransaction - the transaction (not null)@NotNull public abstract Xid getXid(@NotNull Transaction transaction)
LocalTransactionProvidergetXid in interface LocalTransactionProvidertransaction - the transaction (not null)null)@NotNull public String getNodeName()
LocalTransactionProvidergetNodeName in interface LocalTransactionProvidernull)public String getNameFromXid(@NotNull Xid xid)
LocalTransactionProvidernull is returned.getNameFromXid in interface LocalTransactionProviderxid - the XID (not null)public <T> T getProviderInterface(Transaction transaction, Class<T> providerInterfaceType)
LocalTransactionProvidergetProviderInterface in interface LocalTransactionProviderT - the provider interface typetransaction - the provider transaction (not null)providerInterfaceType - the provider interface type class (not null)null if none matchesCopyright © 2020 JBoss by Red Hat. All rights reserved.