Class StateDescriptor<T>

    • Constructor Detail

      • StateDescriptor

        protected StateDescriptor​(@Nonnull
                                  String stateId,
                                  org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo)
        Create a new StateDescriptor with the given stateId and the given type information.
        Parameters:
        stateId - The stateId of the StateDescriptor.
        typeInfo - The type information for the values in the state.
      • StateDescriptor

        protected StateDescriptor​(@Nonnull
                                  String stateId,
                                  @Nonnull
                                  org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo,
                                  org.apache.flink.api.common.serialization.SerializerConfig serializerConfig)
        Create a new StateDescriptor with the given stateId and the given type information.
        Parameters:
        stateId - The stateId of the StateDescriptor.
        typeInfo - The type information for the values in the state.
        serializerConfig - The serializer related config used to generate TypeSerializer.
    • Method Detail

      • enableTimeToLive

        public void enableTimeToLive​(org.apache.flink.api.common.state.StateTtlConfig ttlConfig)
        Configures optional activation of state time-to-live (TTL).

        State user value will expire, become unavailable and be cleaned up in storage depending on configured StateTtlConfig.

        Parameters:
        ttlConfig - configuration of state TTL
      • getTtlConfig

        @Nonnull
        public org.apache.flink.api.common.state.StateTtlConfig getTtlConfig()
      • getStateId

        @Nonnull
        public String getStateId()
      • getSerializer

        @Nonnull
        public org.apache.flink.api.common.typeutils.TypeSerializer<T> getSerializer()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getType

        public abstract StateDescriptor.Type getType()
        Return the specific Type of described state.