public abstract class AbstractTransaction extends Object implements Transaction
| Modifier and Type | Method and Description |
|---|---|
abstract void |
commit() |
int |
getEstimatedRemainingTime()
Get an estimate of the amount of time remaining in this transaction.
|
<T> T |
getProviderInterface(Class<T> providerInterfaceType)
Get a provider-specific interface from this transaction.
|
abstract Object |
getResource(Object key) |
abstract int |
getTransactionTimeout()
Get the transaction timeout that was in force when the transaction began.
|
<E extends Exception> |
performAction(org.wildfly.common.function.ExceptionRunnable<E> action) |
<T,U,E extends Exception> |
performConsumer(org.wildfly.common.function.ExceptionBiConsumer<T,U,E> consumer,
T param1,
U param2) |
<T,E extends Exception> |
performConsumer(org.wildfly.common.function.ExceptionConsumer<T,E> consumer,
T param) |
<T,E extends Exception> |
performConsumer(org.wildfly.common.function.ExceptionObjIntConsumer<T,E> consumer,
T param1,
int param2) |
<T,U,R,E extends Exception> |
performFunction(org.wildfly.common.function.ExceptionBiFunction<T,U,R,E> function,
T param1,
U param2) |
<T,R,E extends Exception> |
performFunction(org.wildfly.common.function.ExceptionFunction<T,R,E> function,
T param) |
<R,E extends Exception> |
performSupplier(org.wildfly.common.function.ExceptionSupplier<R,E> function) |
<T,U,E extends Exception> |
performToIntFunction(org.wildfly.common.function.ExceptionToIntBiFunction<T,U,E> function,
T param1,
U param2) |
<T,E extends Exception> |
performToIntFunction(org.wildfly.common.function.ExceptionToIntFunction<T,E> function,
T param) |
abstract void |
putResource(Object key,
Object value) |
abstract Object |
putResourceIfAbsent(Object key,
Object value) |
void |
registerAssociationListener(AssociationListener associationListener)
Register an association listener for this transaction, which will be called any time this thread is suspended
or resumed.
|
abstract void |
rollback() |
void |
setRollbackOnly() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelistResource, enlistResource, getStatus, registerSynchronizationpublic abstract Object getResource(Object key) throws NullPointerException
NullPointerExceptionpublic abstract void putResource(Object key, Object value) throws NullPointerException
NullPointerExceptionpublic abstract Object putResourceIfAbsent(Object key, Object value) throws IllegalArgumentException
IllegalArgumentExceptionpublic void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly in interface TransactionIllegalStateExceptionSystemExceptionpublic abstract int getTransactionTimeout()
public final int getEstimatedRemainingTime()
public <T> T getProviderInterface(Class<T> providerInterfaceType)
T - the provider interface typeproviderInterfaceType - the provider interface type class (must not be null)null if the given type isn't supported by this transaction's providerpublic void registerAssociationListener(AssociationListener associationListener)
associationListener - the association listener (must not be null)public abstract void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
SystemException
commit in interface TransactionRollbackExceptionHeuristicMixedExceptionHeuristicRollbackExceptionSecurityExceptionSystemExceptionpublic abstract void rollback()
throws IllegalStateException,
SystemException
rollback in interface TransactionIllegalStateExceptionSystemExceptionpublic <T,U,R,E extends Exception> R performFunction(org.wildfly.common.function.ExceptionBiFunction<T,U,R,E> function, T param1, U param2) throws E extends Exception, SystemException
E extends ExceptionSystemExceptionpublic <T,R,E extends Exception> R performFunction(org.wildfly.common.function.ExceptionFunction<T,R,E> function, T param) throws E extends Exception, SystemException
E extends ExceptionSystemExceptionpublic <R,E extends Exception> R performSupplier(org.wildfly.common.function.ExceptionSupplier<R,E> function) throws E extends Exception, SystemException
E extends ExceptionSystemExceptionpublic <T,E extends Exception> void performConsumer(org.wildfly.common.function.ExceptionObjIntConsumer<T,E> consumer, T param1, int param2) throws E extends Exception, SystemException
E extends ExceptionSystemExceptionpublic <T,U,E extends Exception> void performConsumer(org.wildfly.common.function.ExceptionBiConsumer<T,U,E> consumer, T param1, U param2) throws E extends Exception, SystemException
E extends ExceptionSystemExceptionpublic <T,E extends Exception> void performConsumer(org.wildfly.common.function.ExceptionConsumer<T,E> consumer, T param) throws E extends Exception, SystemException
E extends ExceptionSystemExceptionpublic <T,U,E extends Exception> int performToIntFunction(org.wildfly.common.function.ExceptionToIntBiFunction<T,U,E> function, T param1, U param2) throws E extends Exception, SystemException
E extends ExceptionSystemExceptionpublic <T,E extends Exception> int performToIntFunction(org.wildfly.common.function.ExceptionToIntFunction<T,E> function, T param) throws E extends Exception, SystemException
E extends ExceptionSystemExceptionpublic <E extends Exception> void performAction(org.wildfly.common.function.ExceptionRunnable<E> action) throws E extends Exception, SystemException
E extends ExceptionSystemExceptionCopyright © 2020 JBoss by Red Hat. All rights reserved.