Class ThreadLocalTransactionBatch<E extends RuntimeException>
java.lang.Object
org.wildfly.clustering.cache.infinispan.batch.ThreadLocalTransactionBatch<E>
- Type Parameters:
E- the exception wrapper type for transaction-related exceptions
- All Implemented Interfaces:
AutoCloseable,Batch,SuspendedBatch,TransactionBatch
public class ThreadLocalTransactionBatch<E extends RuntimeException>
extends Object
implements TransactionBatch
TransactionBatch that associates and exposes the underlying transaction.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.wildfly.clustering.cache.infinispan.batch.TransactionBatch
TransactionBatch.Factory -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddiscard()Discards this batch.booleanjakarta.transaction.TransactionReturns the transaction associated with this batchinthashCode()Returns an interposed batch.booleanisActive()Indicates whether or not this batch is active.booleanisClosed()Indicates whether or not this batch was closed.booleanIndicates whether or not this batch will be discarded.resume()Resumes this batch.Resumes this batch untilContext.close().suspend()Suspends this batch.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.wildfly.clustering.cache.batch.Batch
suspendWithContext
-
Method Details
-
isActive
public boolean isActive()Description copied from interface:BatchIndicates whether or not this batch is active. -
isDiscarding
public boolean isDiscarding()Description copied from interface:BatchIndicates whether or not this batch will be discarded.- Specified by:
isDiscardingin interfaceBatch- Returns:
- true, if this batch was discarded, false otherwise.
-
isClosed
public boolean isClosed()Description copied from interface:BatchIndicates whether or not this batch was closed. -
suspend
Description copied from interface:BatchSuspends this batch. -
resume
Description copied from interface:SuspendedBatchResumes this batch.- Specified by:
resumein interfaceSuspendedBatch- Returns:
- the resumed batch.
-
resumeWithContext
Description copied from interface:SuspendedBatchResumes this batch untilContext.close().- Specified by:
resumeWithContextin interfaceSuspendedBatch- Returns:
- a resumed batch context
-
getTransaction
public jakarta.transaction.Transaction getTransaction()Description copied from interface:TransactionBatchReturns the transaction associated with this batch- Specified by:
getTransactionin interfaceTransactionBatch- Returns:
- a transaction
-
interpose
Description copied from interface:TransactionBatchReturns an interposed batch.- Specified by:
interposein interfaceTransactionBatch- Returns:
- an interposed batch.
-
discard
public void discard()Description copied from interface:BatchDiscards this batch. A discarded batch must still be closed. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBatch
-
hashCode
public int hashCode() -
equals
-
toString
-