Interface Batch

All Superinterfaces:
AutoCloseable

public interface Batch extends AutoCloseable
Exposes a mechanism to close a batch, and potentially discard it.
Author:
Paul Ferraro
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The possible states of a batch.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    Discards this batch.
    Returns the state of this batch.
    default boolean
    Indicates whether or not this batch is active.
    default boolean
    Indicates whether or not this batch was closed.
    default boolean
    Indicates whether or not this batch was discarded.
  • Method Details

    • discard

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

      Batch.State getState()
      Returns the state of this batch.
      Returns:
      the state of this batch.
    • isActive

      default boolean isActive()
      Indicates whether or not this batch is active.
      Returns:
      true, if this batch is active, false otherwise.
    • isDiscarded

      default boolean isDiscarded()
      Indicates whether or not this batch was discarded.
      Returns:
      true, if this batch was discarded, false otherwise.
    • isClosed

      default boolean isClosed()
      Indicates whether or not this batch was closed.
      Returns:
      true, if this batch was closed, false otherwise.
    • close

      void close()
      Specified by:
      close in interface AutoCloseable