Class SuppressedInternal<K>
- java.lang.Object
-
- org.apache.kafka.streams.kstream.internals.suppress.SuppressedInternal<K>
-
- All Implemented Interfaces:
NamedSuppressed<K>
,Suppressed<K>
public class SuppressedInternal<K> extends Object implements Suppressed<K>, NamedSuppressed<K>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.kafka.streams.kstream.Suppressed
Suppressed.BufferConfig<BC extends Suppressed.BufferConfig<BC>>, Suppressed.EagerBufferConfig, Suppressed.StrictBufferConfig
-
-
Constructor Summary
Constructors Constructor Description SuppressedInternal(String name, Duration suppressionTime, Suppressed.BufferConfig bufferConfig, org.apache.kafka.streams.kstream.internals.suppress.TimeDefinitions.TimeDefinition<K> timeDefinition, boolean safeToDropTombstones)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <BC extends Suppressed.BufferConfig<BC>>
BufferConfigInternal<BC>bufferConfig()
boolean
equals(Object o)
int
hashCode()
String
name()
String
toString()
Suppressed<K>
withName(String name)
Use the specified name for the suppression node in the topology.
-
-
-
Constructor Detail
-
SuppressedInternal
public SuppressedInternal(String name, Duration suppressionTime, Suppressed.BufferConfig bufferConfig, org.apache.kafka.streams.kstream.internals.suppress.TimeDefinitions.TimeDefinition<K> timeDefinition, boolean safeToDropTombstones)
- Parameters:
safeToDropTombstones
- Note: it's *only* safe to drop tombstones for windowed KTables in "final results" mode. In that case, we have a priori knowledge that we have never before emitted any results for a given key, and therefore the tombstone is unnecessary (albeit idempotent and correct). We decided that the unnecessary tombstones would not be desirable in the output stream, though, hence the ability to drop them. A alternative is to remember whether a result has previously been emitted for a key and drop tombstones in that case, but it would be a little complicated to figure out when to forget the fact that we have emitted some result (currently, the buffer immediately forgets all about a key when we emit, which helps to keep it compact).
-
-
Method Detail
-
withName
public Suppressed<K> withName(String name)
Description copied from interface:Suppressed
Use the specified name for the suppression node in the topology.This can be used to insert a suppression without changing the rest of the topology names (and therefore not requiring an application reset).
Note however, that once a suppression has buffered some records, removing it from the topology would cause the loss of those records.
A suppression can be "disabled" with the configuration
untilTimeLimit(Duration.ZERO, ...
.- Specified by:
withName
in interfaceSuppressed<K>
- Parameters:
name
- The name to be used for the suppression node and changelog topic- Returns:
- The same configuration with the addition of the given
name
.
-
name
public String name()
- Specified by:
name
in interfaceNamedSuppressed<K>
-
bufferConfig
public <BC extends Suppressed.BufferConfig<BC>> BufferConfigInternal<BC> bufferConfig()
-
-