Class InternalStreamsLifecycleContext
- java.lang.Object
-
- io.streamthoughts.azkarra.api.streams.internal.InternalStreamsLifecycleContext
-
- All Implemented Interfaces:
StreamsLifecycleContext
public class InternalStreamsLifecycleContext extends Object implements StreamsLifecycleContext
InternalStreamsLifecycleContextimplementation.
-
-
Constructor Summary
Constructors Constructor Description InternalStreamsLifecycleContext(KafkaStreamsContainer container)Creates a newInternalStreamsLifecycleContextinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStateChangeWatcher(KafkaStreamsContainer.StateChangeWatcher watcher)Register a watcher to be notified ofKafkaStreams.Statechange event.StringapplicationId()Getsapplication.idof the current streams instance.KafkaStreamsContainercontainer()Return the container that is running the currentKafkaStreamsinstance.voidsetState(State state)Sets the state of the current streams instance.ConfstreamsConfig()Gets the configuration of the current streams instance.StatestreamsState()Gets the state value of the current streams instance.org.apache.kafka.streams.TopologyDescriptiontopologyDescription()Gets theTopologyDescriptionof the current streams instance.StringtopologyName()VersiontopologyVersion()
-
-
-
Constructor Detail
-
InternalStreamsLifecycleContext
public InternalStreamsLifecycleContext(KafkaStreamsContainer container)
Creates a newInternalStreamsLifecycleContextinstance.- Parameters:
container- theKafkaStreamsContainerinstance
-
-
Method Detail
-
topologyName
public String topologyName()
- Specified by:
topologyNamein interfaceStreamsLifecycleContext- Returns:
- the user-specified name for the streams.
-
topologyVersion
public Version topologyVersion()
- Specified by:
topologyVersionin interfaceStreamsLifecycleContext- Returns:
- the version of the streams topology.
-
applicationId
public String applicationId()
Getsapplication.idof the current streams instance.- Specified by:
applicationIdin interfaceStreamsLifecycleContext- Returns:
- return
application.idof the current streams instance.
-
topologyDescription
public org.apache.kafka.streams.TopologyDescription topologyDescription()
Gets theTopologyDescriptionof the current streams instance.- Specified by:
topologyDescriptionin interfaceStreamsLifecycleContext- Returns:
- the
TopologyDescriptioninstance; cannot benull.
-
streamsConfig
public Conf streamsConfig()
Gets the configuration of the current streams instance.- Specified by:
streamsConfigin interfaceStreamsLifecycleContext- Returns:
- the
Confinstance; cannot benull.
-
streamsState
public State streamsState()
Gets the state value of the current streams instance.- Specified by:
streamsStatein interfaceStreamsLifecycleContext- Returns:
- the
State; cannot benull.
-
setState
public void setState(State state)
Sets the state of the current streams instance.- Specified by:
setStatein interfaceStreamsLifecycleContext- Parameters:
state- the newState.
-
addStateChangeWatcher
public void addStateChangeWatcher(KafkaStreamsContainer.StateChangeWatcher watcher)
Register a watcher to be notified ofKafkaStreams.Statechange event.- Specified by:
addStateChangeWatcherin interfaceStreamsLifecycleContext- Parameters:
watcher- theKafkaStreamsContainer.StateChangeWatcherto be registered.
-
container
public KafkaStreamsContainer container()
Return the container that is running the currentKafkaStreamsinstance.- Returns:
- the
KafkaStreamsContainer; cannot benull.
-
-