Class 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>
    StateDescriptor for ListState. This can be used to create partitioned list state internally.
    See Also:
    Serialized Form
    • Constructor Detail

      • ListStateDescriptor

        public ListStateDescriptor​(@Nonnull
                                   String stateId,
                                   @Nonnull
                                   TypeInformation<T> typeInfo)
        Creates a new ListStateDescriptor with 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 new ListStateDescriptor with 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 new 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.

        Parameters:
        name - The (unique) name for the state.
        elementTypeClass - The type of the elements in the state.