Package org.copperengine.core.batcher
Interface BatchCommand<E extends BatchExecutorBase<E,T>,T extends BatchCommand<E,T>>
-
- Type Parameters:
E
- type of the BatchExecutorT
- type of the BatchCommand to be executed
- All Known Implementing Classes:
AbstractBatchCommand
,BatchInsertIntoAutoTrail.Command
public interface BatchCommand<E extends BatchExecutorBase<E,T>,T extends BatchCommand<E,T>>
A BatchCommand is one task executed in a Batch. BatchCommands with the same executor are batched by theBatcher
. Usually, a BatchCommand should hold the data unique to each command, where the executor holds the sql-queries and puts the data from all commands into the queries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandCallback<T>
callback()
E
executor()
long
targetTime()
-
-
-
Method Detail
-
executor
E executor()
- Returns:
- the executor for this BatchCommand.
-
callback
CommandCallback<T> callback()
- Returns:
- the callback called by the batcher, after this command has been processed. Used for asynchronously notifying the caller.
-
targetTime
long targetTime()
- Returns:
- the targetTime timestamp in java milliseconds until which this batch command shall be executed. This value influences how long the used batcher is collecting BatchCommands with the same executor.
-
-