T
- The type of the values that can be added to the list state.@PublicEvolving public class ListStateDescriptor<T> extends StateDescriptor<ListState<T>,T>
StateDescriptor
for ListState
. This can be used to create a partitioned
list state using
RuntimeContext.getListState(ListStateDescriptor)
.Constructor and Description |
---|
ListStateDescriptor(String name,
Class<T> typeClass)
Creates a new
ListStateDescriptor with the given name and list element type. |
ListStateDescriptor(String name,
TypeInformation<T> typeInfo)
Creates a new
ListStateDescriptor with the given name and list element type. |
ListStateDescriptor(String name,
TypeSerializer<T> typeSerializer)
Creates a new
ListStateDescriptor with the given name and list element type. |
Modifier and Type | Method and Description |
---|---|
ListState<T> |
bind(StateBackend stateBackend)
Creates a new
State on the given StateBackend . |
equals, getDefaultValue, getName, getSerializer, hashCode, initializeSerializerUnlessSet, isSerializerInitialized, toString
public ListStateDescriptor(String name, Class<T> typeClass)
ListStateDescriptor
with 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.
name
- The (unique) name for the state.typeClass
- The type of the values in the state.public ListStateDescriptor(String name, TypeInformation<T> typeInfo)
ListStateDescriptor
with the given name and list element type.name
- The (unique) name for the state.typeInfo
- The type of the values in the state.public ListStateDescriptor(String name, TypeSerializer<T> typeSerializer)
ListStateDescriptor
with the given name and list element type.name
- The (unique) name for the state.typeSerializer
- The type serializer for the list values.public ListState<T> bind(StateBackend stateBackend) throws Exception
StateDescriptor
State
on the given StateBackend
.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.