Interface BatchOperation
-
- All Known Implementing Classes:
AbstractBatchOperation
,HistoryActorFactory.TagRetirementBatchOperation
public interface BatchOperation
A BatchOperation collects together a set of operations that should be executed together as a batch. The implementation of this class should carefully track changes, and take care to not allow mutations during execution. However, it's usually smart to not lock during the entire execution, so one common pattern is to clone the data at the start of exec in a lock, and then operate on that, allowing new data to be accumulated along the way. This batch operation will be reused, so the implementation should carefully manage internal data.- Since:
- 8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
BatchOperation.BatchContextController
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
execute(ProviderContext context)
BatchOperation.BatchContextController
getController()
default int
getExecDelayMS()
Returns roughly how long this operation should buffer before executing.void
setController(BatchOperation.BatchContextController controller)
boolean
shouldSchedule()
Indicates that this operation has outstanding data and should be scheduled for execution.
-
-
-
Method Detail
-
getExecDelayMS
default int getExecDelayMS()
Returns roughly how long this operation should buffer before executing.
-
setController
void setController(BatchOperation.BatchContextController controller)
-
getController
BatchOperation.BatchContextController getController()
-
execute
void execute(ProviderContext context)
-
shouldSchedule
boolean shouldSchedule()
Indicates that this operation has outstanding data and should be scheduled for execution.
-
-