public abstract static class WrappedStateStore.AbstractStateStore extends java.lang.Object implements WrappedStateStore
WrappedStateStore.AbstractStateStore
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the storage engine.
|
void |
flush()
Flush any cached data
|
void |
init(ProcessorContext context,
StateStore root)
Initializes this state store.
|
StateStore |
inner()
Return the inner most storage engine
|
boolean |
isOpen()
Is this store open for reading and writing
|
java.lang.String |
name()
The name of this store.
|
boolean |
persistent()
Return if the storage is persistent or not.
|
StateStore |
wrappedStore()
Return the state store this store directly wraps
|
public void init(ProcessorContext context, StateStore root)
StateStore
The implementation of this function must register the root store in the context via the
ProcessorContext.register(StateStore, StateRestoreCallback)
function, where the
first StateStore
parameter should always be the passed-in root
object, and
the second parameter should be an object of user's implementation
of the StateRestoreCallback
interface used for restoring the state store from the changelog.
Note that if the state store engine itself supports bulk writes, users can implement another
interface BatchingStateRestoreCallback
which extends StateRestoreCallback
to
let users implement bulk-load restoration logic instead of restoring one record at a time.
init
in interface StateStore
public java.lang.String name()
StateStore
name
in interface StateStore
public boolean persistent()
StateStore
persistent
in interface StateStore
true
if the storage is persistent—false
otherwisepublic boolean isOpen()
StateStore
isOpen
in interface StateStore
true
if the store is openpublic StateStore inner()
WrappedStateStore
inner
in interface WrappedStateStore
public void flush()
StateStore
flush
in interface StateStore
public void close()
StateStore
Users only need to implement this function but should NEVER need to call this api explicitly as it will be called by the library automatically when necessary
close
in interface StateStore
public StateStore wrappedStore()
WrappedStateStore
wrappedStore
in interface WrappedStateStore