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
  • Method Details

    • isActive

      public boolean isActive()
      Description copied from interface: Batch
      Indicates whether or not this batch is active.
      Specified by:
      isActive in interface Batch
      Returns:
      true, if this batch is active, false otherwise.
    • isDiscarding

      public boolean isDiscarding()
      Description copied from interface: Batch
      Indicates whether or not this batch will be discarded.
      Specified by:
      isDiscarding in interface Batch
      Returns:
      true, if this batch was discarded, false otherwise.
    • isClosed

      public boolean isClosed()
      Description copied from interface: Batch
      Indicates whether or not this batch was closed.
      Specified by:
      isClosed in interface Batch
      Returns:
      true, if this batch was closed, false otherwise.
    • suspend

      public SuspendedBatch suspend()
      Description copied from interface: Batch
      Suspends this batch.
      Specified by:
      suspend in interface Batch
      Returns:
      a suspended batch
    • resume

      public Batch resume()
      Description copied from interface: SuspendedBatch
      Resumes this batch.
      Specified by:
      resume in interface SuspendedBatch
      Returns:
      the resumed batch.
    • resumeWithContext

      public BatchContext<Batch> resumeWithContext()
      Description copied from interface: SuspendedBatch
      Resumes this batch until Context.close().
      Specified by:
      resumeWithContext in interface SuspendedBatch
      Returns:
      a resumed batch context
    • getTransaction

      public jakarta.transaction.Transaction getTransaction()
      Description copied from interface: TransactionBatch
      Returns the transaction associated with this batch
      Specified by:
      getTransaction in interface TransactionBatch
      Returns:
      a transaction
    • interpose

      public TransactionBatch interpose()
      Description copied from interface: TransactionBatch
      Returns an interposed batch.
      Specified by:
      interpose in interface TransactionBatch
      Returns:
      an interposed batch.
    • discard

      public void discard()
      Description copied from interface: Batch
      Discards this batch. A discarded batch must still be closed.
      Specified by:
      discard in interface Batch
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Batch
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object