StateManager¶
StateManager
is an abstraction of state managers.
Contract¶
baseDir¶
File baseDir()
Used when:
AbstractProcessorContext
is requested for the stateDirGlobalStateUpdateTask
is requested to closeStateManagerUtil
is requested to closeStateManager
changelogFor¶
String changelogFor(
String storeName)
Used when:
AbstractProcessorContext
is requested for the changelogForGlobalStateManagerImpl
is createdProcessorStateManager
is requested to getStorePartition and isLoggingEnabled
changelogOffsets¶
Map<TopicPartition, Long> changelogOffsets()
Used when:
AbstractTask
is requested to maybeWriteCheckpointGlobalStateUpdateTask
is requested to initializeProcessorStateManager
is requested to changelogPartitionsStandbyTask
is requested to commitNeeded and changelogOffsetsStoreChangelogReader
is requested to getPositionStringStreamTask
is requested to changelogOffsets
checkpoint¶
void checkpoint()
Used when:
AbstractTask
is requested to maybeWriteCheckpointGlobalStateUpdateTask
is requested to flushState
close¶
void close()
Used when:
GlobalStateUpdateTask
is requested to closeStateManagerUtil
is requested to closeStateManager
flush¶
void flush()
Used when:
AbstractTask
is requested to maybeWriteCheckpointGlobalStateUpdateTask
is requested to flushState
getGlobalStore¶
StateStore getGlobalStore(
String name)
Used when:
GlobalProcessorContextImpl
is requested to getStateStoreGlobalStateManagerImpl
is requested to getStoreProcessorContextImpl
is requested to getStateStore
getStore¶
StateStore getStore(
String name)
Used when:
AbstractTask
is requested to getStoreProcessorContextImpl
is requested to getStateStoreTopologyTestDriver
is requested to getStateStore
registerStore¶
void registerStore(
StateStore store,
StateRestoreCallback stateRestoreCallback)
Used when:
AbstractProcessorContext
is requested to register
taskType¶
TaskType taskType()
updateChangelogOffsets¶
void updateChangelogOffsets(
Map<TopicPartition, Long> writtenOffsets)
Used when:
GlobalStateUpdateTask
is requested to flushStateStreamTask
is requested to maybeWriteCheckpoint