Interface BatchedWorkProcessor


public interface BatchedWorkProcessor
A processor of batched works submitted to a BatchingExecutor.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Initializes internal state before works are submitted.
    void
    Executes any outstanding operation, or schedule their execution.
    Ensures all works submitted since the last call to beginBatch() will actually be executed, along with any finishing task (commit, ...).
  • Method Details

    • beginBatch

      void beginBatch()
      Initializes internal state before works are submitted.
    • endBatch

      CompletableFuture<?> endBatch()
      Ensures all works submitted since the last call to beginBatch() will actually be executed, along with any finishing task (commit, ...).
      Returns:
      A future completing when the executor is allowed to start another batch.
    • complete

      void complete()
      Executes any outstanding operation, or schedule their execution.

      Called when the executor considers the work queue complete and does not plan on submitting another batch due to work starvation.