Class InternalStreamsLifecycleContext
- java.lang.Object
-
- io.streamthoughts.azkarra.api.streams.internal.InternalStreamsLifecycleContext
-
- All Implemented Interfaces:
StreamsLifecycleContext
public class InternalStreamsLifecycleContext extends Object implements StreamsLifecycleContext
InternalStreamsLifecycleContext
implementation.
-
-
Constructor Summary
Constructors Constructor Description InternalStreamsLifecycleContext(KafkaStreamsContainer container)
Creates a newInternalStreamsLifecycleContext
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStateChangeWatcher(KafkaStreamsContainer.StateChangeWatcher watcher)
Register a watcher to be notified ofKafkaStreams.State
change event.String
applicationId()
Getsapplication.id
of the current streams instance.KafkaStreamsContainer
container()
Return the container that is running the currentKafkaStreams
instance.void
setState(State state)
Sets the state of the current streams instance.Conf
streamsConfig()
Gets the configuration of the current streams instance.State
streamsState()
Gets the state value of the current streams instance.org.apache.kafka.streams.TopologyDescription
topologyDescription()
Gets theTopologyDescription
of the current streams instance.String
topologyName()
Version
topologyVersion()
-
-
-
Constructor Detail
-
InternalStreamsLifecycleContext
public InternalStreamsLifecycleContext(KafkaStreamsContainer container)
Creates a newInternalStreamsLifecycleContext
instance.- Parameters:
container
- theKafkaStreamsContainer
instance
-
-
Method Detail
-
topologyName
public String topologyName()
- Specified by:
topologyName
in interfaceStreamsLifecycleContext
- Returns:
- the user-specified name for the streams.
-
topologyVersion
public Version topologyVersion()
- Specified by:
topologyVersion
in interfaceStreamsLifecycleContext
- Returns:
- the version of the streams topology.
-
applicationId
public String applicationId()
Getsapplication.id
of the current streams instance.- Specified by:
applicationId
in interfaceStreamsLifecycleContext
- Returns:
- return
application.id
of the current streams instance.
-
topologyDescription
public org.apache.kafka.streams.TopologyDescription topologyDescription()
Gets theTopologyDescription
of the current streams instance.- Specified by:
topologyDescription
in interfaceStreamsLifecycleContext
- Returns:
- the
TopologyDescription
instance; cannot benull
.
-
streamsConfig
public Conf streamsConfig()
Gets the configuration of the current streams instance.- Specified by:
streamsConfig
in interfaceStreamsLifecycleContext
- Returns:
- the
Conf
instance; cannot benull
.
-
streamsState
public State streamsState()
Gets the state value of the current streams instance.- Specified by:
streamsState
in interfaceStreamsLifecycleContext
- Returns:
- the
State
; cannot benull
.
-
setState
public void setState(State state)
Sets the state of the current streams instance.- Specified by:
setState
in interfaceStreamsLifecycleContext
- Parameters:
state
- the newState
.
-
addStateChangeWatcher
public void addStateChangeWatcher(KafkaStreamsContainer.StateChangeWatcher watcher)
Register a watcher to be notified ofKafkaStreams.State
change event.- Specified by:
addStateChangeWatcher
in interfaceStreamsLifecycleContext
- Parameters:
watcher
- theKafkaStreamsContainer.StateChangeWatcher
to be registered.
-
container
public KafkaStreamsContainer container()
Return the container that is running the currentKafkaStreams
instance.- Returns:
- the
KafkaStreamsContainer
; cannot benull
.
-
-