Class ListStateDescriptor<T>
- java.lang.Object
-
- org.apache.flink.api.common.state.v2.StateDescriptor<T>
-
- org.apache.flink.api.common.state.v2.ListStateDescriptor<T>
-
- Type Parameters:
T- The type of each value that the list state can hold.
- All Implemented Interfaces:
Serializable
@Experimental public class ListStateDescriptor<T> extends StateDescriptor<T>
StateDescriptorforListState. This can be used to create partitioned list state internally.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.api.common.state.v2.StateDescriptor
StateDescriptor.Type
-
-
Constructor Summary
Constructors Constructor Description ListStateDescriptor(String name, Class<T> elementTypeClass)Creates a newListStateDescriptorwith the given name and list element type.ListStateDescriptor(String stateId, TypeInformation<T> typeInfo)Creates a newListStateDescriptorwith the given stateId and type.ListStateDescriptor(String stateId, TypeSerializer<T> serializer)Create a newListStateDescriptorwith the given stateId and the given type serializer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StateDescriptor.TypegetType()Return the specificTypeof described state.-
Methods inherited from class org.apache.flink.api.common.state.v2.StateDescriptor
enableTimeToLive, equals, getSerializer, getStateId, getTtlConfig, getTypeInformation, hashCode, initializeSerializerUnlessSet, initializeSerializerUnlessSet, isSerializerInitialized, toString
-
-
-
-
Constructor Detail
-
ListStateDescriptor
public ListStateDescriptor(@Nonnull String stateId, @Nonnull TypeInformation<T> typeInfo)Creates a newListStateDescriptorwith the given stateId and type.- Parameters:
stateId- The (unique) stateId for the state.typeInfo- The type of the values in the state.
-
ListStateDescriptor
public ListStateDescriptor(@Nonnull String stateId, @Nonnull TypeSerializer<T> serializer)Create a newListStateDescriptorwith the given stateId and the given type serializer.- Parameters:
stateId- The (unique) stateId for the state.serializer- The type serializer for the values in the state.
-
ListStateDescriptor
public ListStateDescriptor(String name, Class<T> elementTypeClass)
Creates a newListStateDescriptorwith the given name and list element type.If this constructor fails (because it is not possible to describe the type via a class), consider using the
ListStateDescriptor(String, TypeInformation)constructor.- Parameters:
name- The (unique) name for the state.elementTypeClass- The type of the elements in the state.
-
-
Method Detail
-
getType
public StateDescriptor.Type getType()
Description copied from class:StateDescriptorReturn the specificTypeof described state.- Specified by:
getTypein classStateDescriptor<T>
-
-