public static interface BatchingExecutor.WorkProcessor
| Modifier and Type | Method and Description |
|---|---|
void |
beginBatch()
Initializes internal state before works are
submitted. |
long |
completeOrDelay()
Executes any outstanding operation if possible, or return an estimation of when they can be executed.
|
CompletableFuture<?> |
endBatch()
Ensures all works
submitted since the last call to beginBatch()
will actually be executed, along with any finishing task (commit, ...). |
void beginBatch()
submitted.CompletableFuture<?> endBatch()
submitted since the last call to beginBatch()
will actually be executed, along with any finishing task (commit, ...).long completeOrDelay()
Called when the executor considers the work queue complete and does not plan on submitting another batch due to work starvation.
0 if there is no outstanding operation, or a positive number of milliseconds
if there are outstanding operations and completeOrDelay()
must be called again that many milliseconds later.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.