Interface Batch

All Superinterfaces:
AutoCloseable

public interface Batch extends AutoCloseable
Instruments the batching of cache operations. Write-only cache operations invoked while this batch is active (i.e. not suspended) will defer invocation until close(). Calling discard() will cause close() to undo previous write operations and discard any accumulated write-only operations (similar to setRollbackOnly() semantics).
Author:
Paul Ferraro
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The status of a batch.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    Discards this batch.
    Returns the status of this batch.
    Suspends this batch.
    default org.wildfly.clustering.context.Context<SuspendedBatch>
    Suspends this batch until Context.close().
  • Method Details

    • getStatus

      Batch.Status getStatus()
      Returns the status of this batch.
      Returns:
      the status of this batch.
    • suspend

      SuspendedBatch suspend()
      Suspends this batch.
      Returns:
      a suspended batch
    • suspendWithContext

      default org.wildfly.clustering.context.Context<SuspendedBatch> suspendWithContext()
      Suspends this batch until Context.close().
      Returns:
      a suspended batch context
    • discard

      void discard()
      Discards this batch. A discarded batch must still be closed.
    • close

      void close()
      Specified by:
      close in interface AutoCloseable