namespaceSerializer, stateSerializer, StateSnapshotTransformFactory.noTransform());
/** * Creates and returns a new {@link InternalKvState}. * * @param namespaceSerializer TypeSerializer for the state namespace. * @param stateDesc The {@code StateDescriptor} that contains the name of the state. * * @param <N> The type of the namespace. * @param <SV> The type of the stored state value. * @param <S> The type of the public API state. * @param <IS> The type of internal state. */ @Nonnull default <N, SV, S extends State, IS extends S> IS createInternalState( @Nonnull TypeSerializer<N> namespaceSerializer, @Nonnull StateDescriptor<S, SV> stateDesc) throws Exception { return createInternalState(namespaceSerializer, stateDesc, StateSnapshotTransformFactory.noTransform()); }
/** * Creates and returns a new {@link InternalKvState}. * * @param namespaceSerializer TypeSerializer for the state namespace. * @param stateDesc The {@code StateDescriptor} that contains the name of the state. * * @param <N> The type of the namespace. * @param <SV> The type of the stored state value. * @param <S> The type of the public API state. * @param <IS> The type of internal state. */ @Nonnull default <N, SV, S extends State, IS extends S> IS createInternalState( @Nonnull TypeSerializer<N> namespaceSerializer, @Nonnull StateDescriptor<S, SV> stateDesc) throws Exception { return createInternalState(namespaceSerializer, stateDesc, StateSnapshotTransformFactory.noTransform()); }
private StateSnapshotTransformFactory<?> getSnapshotTransformFactory() { if (!ttlConfig.getCleanupStrategies().inFullSnapshot()) { return StateSnapshotTransformFactory.noTransform(); } else { return new TtlStateSnapshotTransformer.Factory<>(timeProvider, ttl); } }
private StateSnapshotTransformFactory<?> getSnapshotTransformFactory() { if (!ttlConfig.getCleanupStrategies().inFullSnapshot()) { return StateSnapshotTransformFactory.noTransform(); } else { return new TtlStateSnapshotTransformer.Factory<>(timeProvider, ttl); } }