Class BufferConfigInternal<BC extends Suppressed.BufferConfig<BC>>
- java.lang.Object
-
- org.apache.kafka.streams.kstream.internals.suppress.BufferConfigInternal<BC>
-
- All Implemented Interfaces:
Suppressed.BufferConfig<BC>
- Direct Known Subclasses:
EagerBufferConfigImpl
,StrictBufferConfigImpl
public abstract class BufferConfigInternal<BC extends Suppressed.BufferConfig<BC>> extends Object implements Suppressed.BufferConfig<BC>
-
-
Constructor Summary
Constructors Constructor Description BufferConfigInternal()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract BufferFullStrategy
bufferFullStrategy()
Suppressed.EagerBufferConfig
emitEarlyWhenFull()
Set the buffer to just emit the oldest records when any of its constraints are violated.abstract Map<String,String>
getLogConfig()
abstract boolean
isLoggingEnabled()
abstract long
maxBytes()
abstract long
maxRecords()
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.Suppressed.StrictBufferConfig
withNoBound()
Set the buffer to be unconstrained by size (either keys or bytes).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.kafka.streams.kstream.Suppressed.BufferConfig
withLoggingDisabled, withLoggingEnabled, withMaxBytes, withMaxRecords
-
-
-
-
Method Detail
-
maxRecords
public abstract long maxRecords()
-
maxBytes
public abstract long maxBytes()
-
bufferFullStrategy
public abstract BufferFullStrategy bufferFullStrategy()
-
withNoBound
public Suppressed.StrictBufferConfig withNoBound()
Description copied from interface:Suppressed.BufferConfig
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.- Specified by:
withNoBound
in interfaceSuppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>
-
shutDownWhenFull
public Suppressed.StrictBufferConfig shutDownWhenFull()
Description copied from interface:Suppressed.BufferConfig
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.- Specified by:
shutDownWhenFull
in interfaceSuppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>
-
emitEarlyWhenFull
public Suppressed.EagerBufferConfig emitEarlyWhenFull()
Description copied from interface:Suppressed.BufferConfig
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.- Specified by:
emitEarlyWhenFull
in interfaceSuppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>
-
isLoggingEnabled
public abstract boolean isLoggingEnabled()
-
-