Class SimpleVersionedListState<T>
java.lang.Object
org.apache.flink.streaming.api.operators.util.SimpleVersionedListState<T>
- Type Parameters:
T- The type of the objects stored in the state.
- All Implemented Interfaces:
org.apache.flink.api.common.state.AppendingState<T,,Iterable<T>> org.apache.flink.api.common.state.ListState<T>,org.apache.flink.api.common.state.MergingState<T,,Iterable<T>> org.apache.flink.api.common.state.State
public class SimpleVersionedListState<T>
extends Object
implements org.apache.flink.api.common.state.ListState<T>
A
ListState that uses a SimpleVersionedSerializer instead of a TypeSerializer.
The state wraps a ListState of type byte[], meaning it internally keeps only
bytes and lazily deserializes them into objects. This has two major implications, compared to a
ListState states that uses a TypeSerializer:
- This state does not participate in >state migration. The bytes are never converted and different state versions are lazily resolved by the versioned serializer.
- This state is generally slower than states that directly use the
TypeSerializer, because of extra copies into byte arrays and extra version encodings.
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleVersionedListState(org.apache.flink.api.common.state.ListState<byte[]> rawState, org.apache.flink.core.io.SimpleVersionedSerializer<T> serializer) Creates a new SimpleVersionedListState that reads and writes bytes from the given raw ListState with the given serializer. -
Method Summary
-
Constructor Details
-
SimpleVersionedListState
public SimpleVersionedListState(org.apache.flink.api.common.state.ListState<byte[]> rawState, org.apache.flink.core.io.SimpleVersionedSerializer<T> serializer) Creates a new SimpleVersionedListState that reads and writes bytes from the given raw ListState with the given serializer.
-
-
Method Details
-
update
-
addAll
-
get
-
add
-
clear
public void clear()- Specified by:
clearin interfaceorg.apache.flink.api.common.state.State
-