public static interface Suppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>
Modifier and Type | Method and Description |
---|---|
Suppressed.EagerBufferConfig |
emitEarlyWhenFull()
Set the buffer to just emit the oldest records when any of its constraints are violated.
|
static Suppressed.EagerBufferConfig |
maxBytes(long byteLimit)
Create a size-constrained buffer in terms of the maximum number of bytes it will use.
|
static Suppressed.EagerBufferConfig |
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 |
withLoggingDisabled()
Disable the changelog for this suppression's internal buffer.
|
BC |
withLoggingEnabled(Map<String,String> config)
Indicates that a changelog topic should be created containing the currently suppressed
records.
|
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.EagerBufferConfig maxRecords(long recordLimit)
BC withMaxRecords(long recordLimit)
static Suppressed.EagerBufferConfig 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.EagerBufferConfig emitEarlyWhenFull()
BC withLoggingDisabled()
BC withLoggingEnabled(Map<String,String> config)
config
- Configs that should be applied to the changelog. Note: Any unrecognized
configs will be ignored.