Interface Suppressed<K>

  • public interface Suppressed<K>
    • Method Detail

      • untilWindowCloses

        static Suppressed<Windowed> untilWindowCloses​(Suppressed.StrictBufferConfig bufferConfig)
        Configure the suppression to emit only the "final results" from the window. By default all Streams operators emit results whenever new results are available. This includes windowed operations. This configuration will instead emit just one result per key for each window, guaranteeing to deliver only the final result. This option is suitable for use cases in which the business logic requires a hard guarantee that only the final result is propagated. For example, sending alerts. To accomplish this, the operator will buffer events from the window until the window close (that is, until the end-time passes, and additionally until the grace period expires). Since windowed operators are required to reject out-of-order events for a window whose grace period is expired, there is an additional guarantee that the final results emitted from this suppression will match any queryable state upstream.
        bufferConfig - A configuration specifying how much space to use for buffering intermediate results. This is required to be a "strict" config, since it would violate the "final results" property to emit early and then issue an update later.
        a "final results" mode suppression configuration
      • untilTimeLimit

        static <K> Suppressed<K> untilTimeLimit​(Duration timeToWaitForMoreEvents,
                                                Suppressed.BufferConfig bufferConfig)
        Configure the suppression to wait timeToWaitForMoreEvents amount of time after receiving a record before emitting it further downstream. If another record for the same key arrives in the mean time, it replaces the first record in the buffer but does not re-start the timer.
        Type Parameters:
        K - The key type for the KTable to apply this suppression to.
        timeToWaitForMoreEvents - The amount of time to wait, per record, for new events.
        bufferConfig - A configuration specifying how much space to use for buffering intermediate results.
        a suppression configuration
      • withName

        Suppressed<K> withName​(String name)
        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, ....

        name - The name to be used for the suppression node and changelog topic
        The same configuration with the addition of the given name.