Interface BatchedWorkProcessor
public interface BatchedWorkProcessor
A processor of batched works submitted to a
BatchingExecutor
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Initializes internal state before works are submitted.void
complete()
Executes any outstanding operation, or schedule their execution.endBatch()
Ensures all works submitted since the last call tobeginBatch()
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 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.
-