Class Batcher.Options

  • Enclosing class:
    Batcher<T>

    public static class Batcher.Options
    extends Object
    Configuration options that govern how the Batcher behaves. All limits are inclusive and validated by the Batcher where relevant. maxHandlers - Maximum number of concurrent handler threads that may be actively processing batches at any given time. Must be >= 1 and determines the size of the underlying executor. minBatchSize - Minimum number of items required before a batch is dispatched during normal operation. If fewer than this number are pending, the batcher waits for more items unless it is shutting down (in which case remaining items are flushed regardless). maxBatchSize - Hard cap on the number of items allowed in a single batch. A value of 0 disables this bound. When both maxBatchSize and maxBatchByteSize are set, whichever limit is reached first finalises the batch. maxBatchByteSize - Hard cap on the cumulative byte size of the items in a single batch, as reported by Batcher.SizableItem.getByteSize(). A value of 0 disables this bound.
    • Constructor Detail

      • Options

        public Options()