Interface KafkaStreamsContainer.StateChangeWatcher
-
- Enclosing class:
- KafkaStreamsContainer
public static interface KafkaStreamsContainer.StateChangeWatcher
Watch aKafkaStreams
instance forKafkaStreams.State
change. By default, aKafkaStreamsContainer.StateChangeWatcher
is one time called, i.e. once it is triggered, it has to re-register itself to watch for further changes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
accept(State newState)
Should this watcher be called for the givenState
.void
onChange(StateChangeEvent event)
Called when state changes.
-
-
-
Method Detail
-
accept
default boolean accept(State newState)
Should this watcher be called for the givenState
.- Parameters:
newState
- the new state of theKafkaStreams
instance.- Returns:
true
if this watcher must be called,false
otherwise.
-
onChange
void onChange(StateChangeEvent event)
Called when state changes. This method should not be blocking.- Parameters:
event
- theStateChangeEvent
-
-