Package org.copperengine.core.batcher
Class AbstractBatchCommand<E extends BatchExecutor<E,T>,T extends AbstractBatchCommand<E,T>>
- java.lang.Object
-
- org.copperengine.core.batcher.AbstractBatchCommand<E,T>
-
- Type Parameters:
E
- type of the BatchExecutorT
- type of the BatchCommand to be executed
- All Implemented Interfaces:
BatchCommand<E,T>
- Direct Known Subclasses:
BatchInsertIntoAutoTrail.Command
public abstract class AbstractBatchCommand<E extends BatchExecutor<E,T>,T extends AbstractBatchCommand<E,T>> extends java.lang.Object implements BatchCommand<E,T>
Abstract base implementation ofBatchCommand
-
-
Constructor Summary
Constructors Constructor Description AbstractBatchCommand(CommandCallback<T> callback)
AbstractBatchCommand(CommandCallback<T> callback, long targetTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandCallback<T>
callback()
long
targetTime()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.copperengine.core.batcher.BatchCommand
executor
-
-
-
-
Constructor Detail
-
AbstractBatchCommand
public AbstractBatchCommand(CommandCallback<T> callback)
-
AbstractBatchCommand
public AbstractBatchCommand(CommandCallback<T> callback, long targetTime)
-
-
Method Detail
-
callback
public CommandCallback<T> callback()
- Specified by:
callback
in interfaceBatchCommand<E extends BatchExecutor<E,T>,T extends AbstractBatchCommand<E,T>>
- Returns:
- the callback called by the batcher, after this command has been processed. Used for asynchronously notifying the caller.
-
targetTime
public long targetTime()
- Specified by:
targetTime
in interfaceBatchCommand<E extends BatchExecutor<E,T>,T extends AbstractBatchCommand<E,T>>
- 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.
-
-