Class GlobalStateManagerImpl
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.GlobalStateManagerImpl
-
- All Implemented Interfaces:
GlobalStateManager
public class GlobalStateManagerImpl extends Object implements GlobalStateManager
This class is responsible for the initialization, restoration, closing, flushing etc of Global State Stores. There is only ever 1 instance of this class per Application Instance.
-
-
Constructor Summary
Constructors Constructor Description GlobalStateManagerImpl(org.apache.kafka.common.utils.LogContext logContext, ProcessorTopology topology, Consumer<byte[],byte[]> globalConsumer, StateDirectory stateDirectory, StateRestoreListener stateRestoreListener, StreamsConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
baseDir()
Map<TopicPartition,Long>
changelogOffsets()
void
checkpoint(Map<TopicPartition,Long> offsets)
void
close()
void
flush()
StateStore
getGlobalStore(String name)
StateStore
getStore(String name)
Set<String>
initialize()
void
registerStore(StateStore store, StateRestoreCallback stateRestoreCallback)
void
setGlobalProcessorContext(InternalProcessorContext globalProcessorContext)
Task.TaskType
taskType()
-
-
-
Constructor Detail
-
GlobalStateManagerImpl
public GlobalStateManagerImpl(org.apache.kafka.common.utils.LogContext logContext, ProcessorTopology topology, Consumer<byte[],byte[]> globalConsumer, StateDirectory stateDirectory, StateRestoreListener stateRestoreListener, StreamsConfig config)
-
-
Method Detail
-
setGlobalProcessorContext
public void setGlobalProcessorContext(InternalProcessorContext globalProcessorContext)
- Specified by:
setGlobalProcessorContext
in interfaceGlobalStateManager
-
initialize
public Set<String> initialize()
- Specified by:
initialize
in interfaceGlobalStateManager
-
getGlobalStore
public StateStore getGlobalStore(String name)
-
getStore
public StateStore getStore(String name)
-
baseDir
public File baseDir()
-
registerStore
public void registerStore(StateStore store, StateRestoreCallback stateRestoreCallback)
-
flush
public void flush()
-
close
public void close() throws IOException
- Throws:
IOException
-
checkpoint
public void checkpoint(Map<TopicPartition,Long> offsets)
-
taskType
public Task.TaskType taskType()
-
changelogOffsets
public Map<TopicPartition,Long> changelogOffsets()
-
-