public final class BufferedBatchPublisher extends Object implements BatchPublisher
BatchConsumer.
If the bounded queue becomes full, further events are dropped until the queue is next flushed.| Modifier and Type | Class and Description |
|---|---|
static interface |
BufferedBatchPublisher.Builder
Builder used to construct a new
BufferedBatchPublisher. |
| Modifier and Type | Method and Description |
|---|---|
static BufferedBatchPublisher.Builder |
newBuilder(BatchConsumer batchConsumer)
Provides a new builder.
|
boolean |
offer(String topic,
JsonValue event)
Inserts the specified element at the tail of this queue if it is possible to do so immediately without
exceeding the queue's capacity, returning
true upon success and false if this queue is full. |
void |
shutdown()
Stops sending batch data, and awaits termination of pending queue tasks when
autoFlush is enabled. |
void |
startup()
Starts periodically sending batch data.
|
public void startup()
startup in interface BatchPublisherpublic void shutdown()
autoFlush is enabled.shutdown in interface BatchPublisherpublic boolean offer(String topic, JsonValue event)
true upon success and false if this queue is full.offer in interface BatchPublishertopic - Event topicevent - Event payload to index, where _id field is the identifiertrue if the element was added to this queue, else falsepublic static BufferedBatchPublisher.Builder newBuilder(BatchConsumer batchConsumer)
batchConsumer - a non-null batch consumerCopyright © 2025 Open Identity Platform Community. All rights reserved.