Interface BufferedBatchPublisher.Builder
-
- Enclosing class:
- BufferedBatchPublisher
public static interface BufferedBatchPublisher.Builder
Builder used to construct a newBufferedBatchPublisher
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BufferedBatchPublisher.Builder
autoFlush(boolean autoFlush)
Whether events to should be automatically flushed on shutdown.BufferedBatchPublisher.Builder
averagePerEventPayloadSize(int averagePerEventPayloadSize)
Sets the average event payload size, used to initialise string buffers.BatchPublisher
build()
Constructs a newBatchPublisher
.BufferedBatchPublisher.Builder
capacity(int capacity)
Sets the maximum queue capacity.BufferedBatchPublisher.Builder
maxBatchEvents(int maxBatchedEvents)
Sets the maximum number of events in a given batch.BufferedBatchPublisher.Builder
writeInterval(Duration writeInterval)
The interval duration between each write.
-
-
-
Method Detail
-
capacity
BufferedBatchPublisher.Builder capacity(int capacity)
Sets the maximum queue capacity. Must be >= 10000.- Parameters:
capacity
- queue capacity- Returns:
- this builder
-
maxBatchEvents
BufferedBatchPublisher.Builder maxBatchEvents(int maxBatchedEvents)
Sets the maximum number of events in a given batch. Must be >= 500.- Parameters:
maxBatchedEvents
- maximum number of batched events- Returns:
- this builder
-
averagePerEventPayloadSize
BufferedBatchPublisher.Builder averagePerEventPayloadSize(int averagePerEventPayloadSize)
Sets the average event payload size, used to initialise string buffers. Must be >= 32.- Parameters:
averagePerEventPayloadSize
- average event payload size- Returns:
- this builder
-
writeInterval
BufferedBatchPublisher.Builder writeInterval(Duration writeInterval)
The interval duration between each write. Must be > 0.- Parameters:
writeInterval
- write interval- Returns:
- this builder
-
autoFlush
BufferedBatchPublisher.Builder autoFlush(boolean autoFlush)
Whether events to should be automatically flushed on shutdown.- Parameters:
autoFlush
- whether to auto flush- Returns:
- this builder
-
build
BatchPublisher build()
Constructs a newBatchPublisher
.- Returns:
- a new
BatchPublisher
-
-