AbstractProcessorContext — Base Of Internal Processor Contexts

AbstractProcessorContext is the base implementation of the InternalProcessorContext contract for processor contexts that FIXME.

Note
AbstractProcessorContext is a Java abstract class and cannot be created directly. It is created indirectly for the concrete AbstractProcessorContexts.
Table 1. AbstractProcessorContexts
AbstractProcessorContext Description

GlobalProcessorContextImpl

ProcessorContextImpl

StandbyContextImpl

Table 2. AbstractProcessorContext’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

applicationId

valueSerde

Default Serde for values (from the StreamsConfig)

keySerde

Default Serde for keys (from the StreamsConfig)

initialized

Flag that indicates whether the AbstractProcessorContext was initialized (true) or not (false)

Turned off (false) when AbstractProcessorContext is requested to uninitialize

Used when AbstractProcessorContext is requested to register a state store

stateDir Method

File stateDir()
Note
stateDir is part of the ProcessorContext Contract to…​FIXME.

stateDir…​FIXME

Registering State Store (And StateRestoreCallback) — register Method

void register(
  StateStore store,
  StateRestoreCallback stateRestoreCallback)
Note
register is part of the ProcessorContext Contract to register a state store (and a StateRestoreCallback).

register simply requests the StateManager to register the state store (and the StateRestoreCallback).

When initialized already, register throws an IllegalStateException:

Can only create state stores during initialization.

uninitialize Method

void uninitialize()
Note
uninitialize is part of the InternalProcessorContext Contract to…​FIXME.

uninitialize marks the content uninitialized (and simply turns the initialized flag off).

Creating AbstractProcessorContext Instance

AbstractProcessorContext takes the following when created:

AbstractProcessorContext initializes the internal registries and counters.

Note
AbstractProcessorContext is a Java abstract class and cannot be created directly. It is created indirectly for the concrete AbstractProcessorContexts.

results matching ""

    No results matching ""