public static interface Suppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>
Modifier and Type | Method and Description |
---|---|
Suppressed.BufferConfig |
emitEarlyWhenFull()
Set the buffer to just emit the oldest records when any of its constraints are violated.
|
static Suppressed.BufferConfig<?> |
maxBytes(long byteLimit)
Create a size-constrained buffer in terms of the maximum number of bytes it will use.
|
static Suppressed.BufferConfig<?> |
maxRecords(long recordLimit)
Create a size-constrained buffer in terms of the maximum number of keys it will store.
|
Suppressed.StrictBufferConfig |
shutDownWhenFull()
Set the buffer to gracefully shut down the application when any of its constraints are violated
This buffer is "strict" in the sense that it will enforce the time bound or shut down.
|
static Suppressed.StrictBufferConfig |
unbounded()
Create a buffer unconstrained by size (either keys or bytes).
|
BC |
withMaxBytes(long byteLimit)
Set a size constraint on the buffer, the maximum number of bytes it will use.
|
BC |
withMaxRecords(long recordLimit)
Set a size constraint on the buffer in terms of the maximum number of keys it will store.
|
Suppressed.StrictBufferConfig |
withNoBound()
Set the buffer to be unconstrained by size (either keys or bytes).
|
static Suppressed.BufferConfig<?> maxRecords(long recordLimit)
BC withMaxRecords(long recordLimit)
static Suppressed.BufferConfig<?> maxBytes(long byteLimit)
BC withMaxBytes(long byteLimit)
static Suppressed.StrictBufferConfig unbounded()
OutOfMemoryError
and shut down (not guaranteed to be a graceful exit). Also, note that
JVM processes under extreme memory pressure may exhibit poor GC behavior.
This is a convenient option if you doubt that your buffer will be that large, but also don't
wish to pick particular constraints, such as in testing.
This buffer is "strict" in the sense that it will enforce the time bound or crash.
It will never emit early.Suppressed.StrictBufferConfig withNoBound()
OutOfMemoryError
and shut down (not guaranteed to be a graceful exit). Also, note that
JVM processes under extreme memory pressure may exhibit poor GC behavior.
This is a convenient option if you doubt that your buffer will be that large, but also don't
wish to pick particular constraints, such as in testing.
This buffer is "strict" in the sense that it will enforce the time bound or crash.
It will never emit early.Suppressed.StrictBufferConfig shutDownWhenFull()
Suppressed.BufferConfig emitEarlyWhenFull()