public class BatchEmitter extends AbstractEmitter implements java.io.Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
BatchEmitter.Builder<T extends BatchEmitter.Builder<T>> |
buffer, bufferSize, executor, httpClientAdapter, requestCallback| Modifier | Constructor and Description |
|---|---|
protected |
BatchEmitter(BatchEmitter.Builder<?> builder) |
| Modifier and Type | Method and Description |
|---|---|
static BatchEmitter.Builder<?> |
builder() |
void |
close()
On close attempt to send all remaining events.
|
void |
emit(TrackerPayload payload)
Adds a payload to the buffer and checks whether we have reached the buffer
limit yet.
|
void |
flushBuffer()
When the buffer limit is reached sending of the buffer is initiated.
|
execute, getBuffer, getBufferSize, isSuccessfulSend, setBufferSizeprotected BatchEmitter(BatchEmitter.Builder<?> builder)
public static BatchEmitter.Builder<?> builder()
public void emit(TrackerPayload payload)
emit in interface Emitteremit in class AbstractEmitterpayload - an event payloadpublic void flushBuffer()
flushBuffer in interface EmitterflushBuffer in class AbstractEmitterpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseable