public class StreamParameters
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
batchLimitEvents
Maximum amount of events in batch.
|
long |
batchTimeoutMillis
Timeout for collecting
batchLimitEvents events. |
long |
commitTimeoutMillis |
java.util.Optional<java.lang.Long> |
streamTimeoutMillis
Stream time to live
|
int |
windowSizeMessages |
| Modifier and Type | Method and Description |
|---|---|
long |
getMessagesAllowedToSend(long limit,
long sentSoFar) |
boolean |
isKeepAliveLimitReached(java.util.stream.IntStream keepAlive) |
boolean |
isStreamLimitReached(long commitedEvents) |
static StreamParameters |
of(int batchLimitEvents,
java.lang.Long streamLimitEvents,
long batchTimeoutSeconds,
java.lang.Long streamTimeoutSeconds,
java.lang.Integer batchKeepAliveIterations,
int windowSizeMessages,
long commitTimeoutSeconds) |
public final int batchLimitEvents
public final long batchTimeoutMillis
batchLimitEvents events. If not collected - send either not full batch
or keep alive message.public final java.util.Optional<java.lang.Long> streamTimeoutMillis
public final int windowSizeMessages
public final long commitTimeoutMillis
public long getMessagesAllowedToSend(long limit,
long sentSoFar)
public boolean isStreamLimitReached(long commitedEvents)
public boolean isKeepAliveLimitReached(java.util.stream.IntStream keepAlive)
public static StreamParameters of(int batchLimitEvents, @Nullable java.lang.Long streamLimitEvents, long batchTimeoutSeconds, @Nullable java.lang.Long streamTimeoutSeconds, @Nullable java.lang.Integer batchKeepAliveIterations, int windowSizeMessages, long commitTimeoutSeconds)