Class AbstractTtlDecorator<T>
java.lang.Object
org.apache.flink.runtime.state.ttl.AbstractTtlDecorator<T>
- Type Parameters:
T- Type of originally wrapped object
- Direct Known Subclasses:
TtlAggregateFunction,TtlReduceFunction
Base class for TTL logic wrappers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.flink.api.common.state.StateTtlConfigprotected final TWrapped original state handler.protected final booleanWhether to renew expiration timestamp on state read access.protected final TtlTimeProviderprotected final longState value time to live in milliseconds.protected final booleanWhether to renew expiration timestamp on state read access. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTtlDecorator(T original, org.apache.flink.api.common.state.StateTtlConfig config, TtlTimeProvider timeProvider) -
Method Summary
Modifier and TypeMethodDescription<V> booleanprotected <T> TgetElementWithTtlCheck(TtlValue<T> ttlValue) <V> VgetUnexpired(TtlValue<V> ttlValue) getWithTtlCheckAndUpdate(org.apache.flink.util.function.SupplierWithException<TtlValue<V>, SE> getter, org.apache.flink.util.function.ThrowingConsumer<TtlValue<V>, CE> updater, org.apache.flink.util.function.ThrowingRunnable<CLE> stateClear) getWrappedWithTtlCheckAndUpdate(org.apache.flink.util.function.SupplierWithException<TtlValue<V>, SE> getter, org.apache.flink.util.function.ThrowingConsumer<TtlValue<V>, CE> updater, org.apache.flink.util.function.ThrowingRunnable<CLE> stateClear) <V> TtlValue<V>rewrapWithNewTs(TtlValue<V> ttlValue) <V> TtlValue<V>wrapWithTs(V value)
-
Field Details
-
original
Wrapped original state handler. -
config
protected final org.apache.flink.api.common.state.StateTtlConfig config -
timeProvider
-
updateTsOnRead
protected final boolean updateTsOnReadWhether to renew expiration timestamp on state read access. -
returnExpired
protected final boolean returnExpiredWhether to renew expiration timestamp on state read access. -
ttl
protected final long ttlState value time to live in milliseconds.
-
-
Constructor Details
-
AbstractTtlDecorator
protected AbstractTtlDecorator(T original, org.apache.flink.api.common.state.StateTtlConfig config, TtlTimeProvider timeProvider)
-
-
Method Details
-
getUnexpired
-
expired
-
wrapWithTs
-
rewrapWithNewTs
-
getWithTtlCheckAndUpdate
public <SE extends Throwable,CE extends Throwable, V getWithTtlCheckAndUpdateCLE extends Throwable, V> (org.apache.flink.util.function.SupplierWithException<TtlValue<V>, SE> getter, org.apache.flink.util.function.ThrowingConsumer<TtlValue<V>, throws SE, CE, CLECE> updater, org.apache.flink.util.function.ThrowingRunnable<CLE> stateClear) -
getWrappedWithTtlCheckAndUpdate
public <SE extends Throwable,CE extends Throwable, TtlValue<V> getWrappedWithTtlCheckAndUpdateCLE extends Throwable, V> (org.apache.flink.util.function.SupplierWithException<TtlValue<V>, SE> getter, org.apache.flink.util.function.ThrowingConsumer<TtlValue<V>, throws SE, CE, CLECE> updater, org.apache.flink.util.function.ThrowingRunnable<CLE> stateClear) -
getElementWithTtlCheck
-