Interface KeyedStateFactory

    • Method Detail

      • createOrUpdateInternalState

        @Nonnull
        default <N,​SV,​S extends State,​IS extends S> IS createOrUpdateInternalState​(@Nonnull
                                                                                                     TypeSerializer<N> namespaceSerializer,
                                                                                                     @Nonnull
                                                                                                     StateDescriptor<S,​SV> stateDesc)
                                                                                              throws Exception
        Creates or updates internal state and returns a new InternalKvState.
        Type Parameters:
        N - The type of the namespace.
        SV - The type of the stored state value.
        S - The type of the public API state.
        IS - The type of internal state.
        Parameters:
        namespaceSerializer - TypeSerializer for the state namespace.
        stateDesc - The StateDescriptor that contains the name of the state.
        Throws:
        Exception
      • createOrUpdateInternalState

        @Nonnull
        <N,​SV,​SEV,​S extends State,​IS extends S> IS createOrUpdateInternalState​(@Nonnull
                                                                                                       TypeSerializer<N> namespaceSerializer,
                                                                                                       @Nonnull
                                                                                                       StateDescriptor<S,​SV> stateDesc,
                                                                                                       @Nonnull
                                                                                                       StateSnapshotTransformer.StateSnapshotTransformFactory<SEV> snapshotTransformFactory)
                                                                                                throws Exception
        Creates or updates internal state and returns a new InternalKvState.
        Type Parameters:
        N - The type of the namespace.
        SV - The type of the stored state value.
        SEV - The type of the stored state value or entry for collection types (list or map).
        S - The type of the public API state.
        IS - The type of internal state.
        Parameters:
        namespaceSerializer - TypeSerializer for the state namespace.
        stateDesc - The StateDescriptor that contains the name of the state.
        snapshotTransformFactory - factory of state snapshot transformer.
        Throws:
        Exception
      • createOrUpdateInternalState

        @Nonnull
        default <N,​SV,​SEV,​S extends State,​IS extends S> IS createOrUpdateInternalState​(@Nonnull
                                                                                                               TypeSerializer<N> namespaceSerializer,
                                                                                                               @Nonnull
                                                                                                               StateDescriptor<S,​SV> stateDesc,
                                                                                                               @Nonnull
                                                                                                               StateSnapshotTransformer.StateSnapshotTransformFactory<SEV> snapshotTransformFactory,
                                                                                                               boolean allowFutureMetadataUpdates)
                                                                                                        throws Exception
        Creates or updates internal state and returns a new InternalKvState.
        Type Parameters:
        N - The type of the namespace.
        SV - The type of the stored state value.
        SEV - The type of the stored state value or entry for collection types (list or map).
        S - The type of the public API state.
        IS - The type of internal state.
        Parameters:
        namespaceSerializer - TypeSerializer for the state namespace.
        stateDesc - The StateDescriptor that contains the name of the state.
        snapshotTransformFactory - factory of state snapshot transformer.
        allowFutureMetadataUpdates - whether allow metadata to update in the future or not.
        Throws:
        Exception