CachingKeyValueStore
is a concrete KeyValueStore of Bytes
keys and byte[]
values (i.e. KeyValueStore<Bytes, byte[]>
).
CachingKeyValueStore
is also a concrete WrappedStateStore of KeyValueStore of Bytes
keys and byte[]
values (i.e. WrappedStateStore<KeyValueStore<Bytes, byte[]>, byte[], byte[]>
).
CachingKeyValueStore
is a concrete CachedStateStore.
CachingKeyValueStore
is created when:
-
KeyValueStoreBuilder
is requested to build a KeyValueStore with caching enabled -
TimestampedKeyValueStoreBuilder
is requested to build a TimestampedKeyValueStore with caching enabled
CachingKeyValueStore
takes a single KeyValueStore (underlying state store) to be created.
void init(
ProcessorContext context,
StateStore root)
Note
|
init is part of the StateStore Contract to initialize the state store.
|
init
initInternal with the ProcessorContext.
init
then requests the underlying KeyValueStore to initialize.
In the end, init
saves the current thread as the streamThread internal registry.
void initInternal(ProcessorContext context)
initInternal
saves the ProcessorContext as the context internal registry.
initInternal
requests the InternalProcessorContext for a ThreadCache that is saved as the cache internal registry.
initInternal
creates the name of the cache for the task ID and the store name and that is saved as the cacheName internal registry.
In the end, initInternal
requests the ThreadCache to addDirtyEntryFlushListener with the cache name and a DirtyEntryFlushListener
that simply putAndMaybeForward the DirtyEntries
.
Note
|
initInternal is used exclusively when CachingKeyValueStore is requested to initialize.
|
void putAndMaybeForward(
ThreadCache.DirtyEntry entry,
InternalProcessorContext context)
putAndMaybeForward
…FIXME
Note
|
putAndMaybeForward is used exclusively when CachingKeyValueStore is requested to initialize (via initInternal).
|
void remove(final Windowed<Bytes> sessionKey)
Note
|
remove is part of SessionStore Contract to…FIXME.
|
remove
…FIXME
Name | Description |
---|---|
|
Used when…FIXME |
|
|
|
Used when…FIXME |
|