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>
AListStatethat uses aSimpleVersionedSerializerinstead of aTypeSerializer.The state wraps a
ListStateof typebyte[], meaning it internally keeps only bytes and lazily deserializes them into objects. This has two major implications, compared to aListStatestates that uses aTypeSerializer:- 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
Constructors Constructor Description 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.
-
-
-
Constructor Detail
-
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 Detail
-
clear
public void clear()
- Specified by:
clearin interfaceorg.apache.flink.api.common.state.State
-
-