Package org.apache.kafka.streams.kstream
Interface Suppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>
-
- All Known Subinterfaces:
Suppressed.StrictBufferConfig
- All Known Implementing Classes:
EagerBufferConfigImpl
,StrictBufferConfigImpl
- Enclosing interface:
- Suppressed<K>
public static interface Suppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method 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).
-
-
-
Method Detail
-
maxRecords
static Suppressed.BufferConfig<?> maxRecords(long recordLimit)
Create a size-constrained buffer in terms of the maximum number of keys it will store.
-
withMaxRecords
BC withMaxRecords(long recordLimit)
Set a size constraint on the buffer in terms of the maximum number of keys it will store.
-
maxBytes
static Suppressed.BufferConfig<?> maxBytes(long byteLimit)
Create a size-constrained buffer in terms of the maximum number of bytes it will use.
-
withMaxBytes
BC withMaxBytes(long byteLimit)
Set a size constraint on the buffer, the maximum number of bytes it will use.
-
unbounded
static Suppressed.StrictBufferConfig unbounded()
Create a buffer unconstrained by size (either keys or bytes). As a result, the buffer will consume as much memory as it needs, dictated by the time bound. If there isn't enough heap available to meet the demand, the application will encounter anOutOfMemoryError
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.
-
withNoBound
Suppressed.StrictBufferConfig withNoBound()
Set the buffer to be unconstrained by size (either keys or bytes). As a result, the buffer will consume as much memory as it needs, dictated by the time bound. If there isn't enough heap available to meet the demand, the application will encounter anOutOfMemoryError
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.
-
shutDownWhenFull
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. It will never emit early.
-
emitEarlyWhenFull
Suppressed.BufferConfig emitEarlyWhenFull()
Set the buffer to just emit the oldest records when any of its constraints are violated. This buffer is "not strict" in the sense that it may emit early, so it is suitable for reducing duplicate results downstream, but does not promise to eliminate them.
-
-