Value
- type of state (value)Namespace
- type of namespace@Internal public interface StateChangeLogger<Value,Namespace> extends Closeable
ChangelogKeyedStateBackend
. The changes are intended
to be stored durably, included into a checkpoint and replayed on recovery in case of failure.
Note that the order of updating the delegated state and logging it using this class usually doesn't matter. However in some cases an already updated state needs to be logged. Besides that, delegated state update is usually local and would fail faster. Therefore, consider updating the delegated state first and logging the change second.
If state update succeeds and changelog append fails immediately then the updated change is discarded as no checkpoints can proceed.
If changelog append fails asynchronously then subsequent checkpoints can only succeed after state materialization.
Modifier and Type | Method and Description |
---|---|
void |
resetWritingMetaFlag()
Enable logging meta data before next writes.
|
void |
valueAdded(Value addedValue,
Namespace ns)
State added, such as append to list.addAll.
|
void |
valueCleared(Namespace ns)
State cleared.
|
void |
valueElementAdded(ThrowingConsumer<DataOutputView,IOException> dataSerializer,
Namespace ns)
State element added, such as append of a single element to a list.
|
void |
valueElementAddedOrUpdated(ThrowingConsumer<DataOutputView,IOException> dataSerializer,
Namespace ns)
State element added or updated, such as put into a map.
|
void |
valueElementRemoved(ThrowingConsumer<DataOutputView,IOException> dataSerializer,
Namespace ns)
State element removed, such mapping removal from a map.
|
void |
valueUpdated(Value newValue,
Namespace ns)
State updated, such as by
ListState.update(java.util.List<T>) . |
void |
valueUpdatedInternal(Value newValue,
Namespace ns)
State update internally (usually with a value that the user has no control over).
|
void valueUpdated(Value newValue, Namespace ns) throws IOException
ListState.update(java.util.List<T>)
.IOException
void valueUpdatedInternal(Value newValue, Namespace ns) throws IOException
IOException
void valueAdded(Value addedValue, Namespace ns) throws IOException
IOException
void valueCleared(Namespace ns) throws IOException
IOException
void valueElementAdded(ThrowingConsumer<DataOutputView,IOException> dataSerializer, Namespace ns) throws IOException
IOException
void valueElementAddedOrUpdated(ThrowingConsumer<DataOutputView,IOException> dataSerializer, Namespace ns) throws IOException
IOException
void valueElementRemoved(ThrowingConsumer<DataOutputView,IOException> dataSerializer, Namespace ns) throws IOException
IOException
void resetWritingMetaFlag()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.