Class GlobalStreamThread
- java.lang.Object
-
- java.lang.Thread
-
- org.apache.kafka.streams.processor.internals.GlobalStreamThread
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GlobalStreamThread.State
The states that the global stream thread can be in-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.UncaughtExceptionHandler
-
-
Field Summary
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description GlobalStreamThread(ProcessorTopology topology, StreamsConfig config, Consumer<byte[],byte[]> globalConsumer, StateDirectory stateDirectory, long cacheSizeBytes, StreamsMetricsImpl streamsMetrics, org.apache.kafka.common.utils.Time time, String threadClientId, StateRestoreListener stateRestoreListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<MetricName,Metric>
consumerMetrics()
void
run()
void
setStateListener(StreamThread.StateListener listener)
Set theStreamThread.StateListener
to be notified when state changes.void
shutdown()
void
start()
GlobalStreamThread.State
state()
boolean
stillRunning()
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
GlobalStreamThread
public GlobalStreamThread(ProcessorTopology topology, StreamsConfig config, Consumer<byte[],byte[]> globalConsumer, StateDirectory stateDirectory, long cacheSizeBytes, StreamsMetricsImpl streamsMetrics, org.apache.kafka.common.utils.Time time, String threadClientId, StateRestoreListener stateRestoreListener)
-
-
Method Detail
-
setStateListener
public void setStateListener(StreamThread.StateListener listener)
Set theStreamThread.StateListener
to be notified when state changes. Note this API is internal to Kafka Streams and is not intended to be used by an external application.
-
state
public GlobalStreamThread.State state()
- Returns:
- The state this instance is in
-
stillRunning
public boolean stillRunning()
-
shutdown
public void shutdown()
-
consumerMetrics
public Map<MetricName,Metric> consumerMetrics()
-
-