Interface BatchCommand<E extends BatchExecutorBase<E,​T>,​T extends BatchCommand<E,​T>>

  • Type Parameters:
    E - type of the BatchExecutor
    T - 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 the Batcher. 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 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.