Interface BatchedWorkProcessor
-
public interface BatchedWorkProcessor
A processor of batched works submitted to aBatchingExecutor
.- See Also:
BatchingExecutor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
beginBatch()
Initializes internal state before works are submitted.void
complete()
Executes any outstanding operation, or schedule their execution.CompletableFuture<?>
endBatch()
Ensures all works submitted since the last call tobeginBatch()
will actually be executed, along with any finishing task (commit, ...).
-
-
-
Method Detail
-
beginBatch
void beginBatch()
Initializes internal state before works are submitted.
-
endBatch
CompletableFuture<?> endBatch()
Ensures all works submitted since the last call tobeginBatch()
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.
-
-