Class TtlAwareSerializerSnapshot<T>
- java.lang.Object
-
- org.apache.flink.runtime.state.ttl.TtlAwareSerializerSnapshot<T>
-
- All Implemented Interfaces:
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T>
public class TtlAwareSerializerSnapshot<T> extends Object implements org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T>
ATypeSerializerSnapshotfor TtlAwareSerializer. This class wraps aTypeSerializerSnapshotwith ttl awareness. It will return true when the wrappedTypeSerializerSnapshotis the instance ofTtlStateFactory.TtlSerializerSnapshot. Also, it overrides the compatibility type check between TtlSerializerSnapshot and non-ttl TypeSerializerSnapshot.If two TtlAwareSerializerSnapshots have the same ttl config, it will return the compatibility check result of the original TypeSerializerSnapshot.
If two TtlAwareSerializerSnapshots have different ttl config, it will return a wrapped compatibility check result.
-
-
Constructor Summary
Constructors Constructor Description TtlAwareSerializerSnapshot()TtlAwareSerializerSnapshot(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T> typeSerializerSnapshot)TtlAwareSerializerSnapshot(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T> typeSerializerSnapshot, boolean isTtlEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)intgetCurrentVersion()org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T>getOrinalTypeSerializerSnapshot()inthashCode()booleanisTtlEnabled()voidreadSnapshot(int readVersion, org.apache.flink.core.memory.DataInputView in, ClassLoader userCodeClassLoader)org.apache.flink.api.common.typeutils.TypeSerializerSchemaCompatibility<T>resolveSchemaCompatibility(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T> oldSerializerSnapshot)org.apache.flink.api.common.typeutils.TypeSerializer<T>restoreSerializer()voidwriteSnapshot(org.apache.flink.core.memory.DataOutputView out)
-
-
-
Constructor Detail
-
TtlAwareSerializerSnapshot
public TtlAwareSerializerSnapshot()
-
TtlAwareSerializerSnapshot
public TtlAwareSerializerSnapshot(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T> typeSerializerSnapshot, boolean isTtlEnabled)
-
TtlAwareSerializerSnapshot
public TtlAwareSerializerSnapshot(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T> typeSerializerSnapshot)
-
-
Method Detail
-
getCurrentVersion
public int getCurrentVersion()
- Specified by:
getCurrentVersionin interfaceorg.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T>
-
writeSnapshot
public void writeSnapshot(org.apache.flink.core.memory.DataOutputView out) throws IOException- Specified by:
writeSnapshotin interfaceorg.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T>- Throws:
IOException
-
readSnapshot
public void readSnapshot(int readVersion, org.apache.flink.core.memory.DataInputView in, ClassLoader userCodeClassLoader) throws IOException- Specified by:
readSnapshotin interfaceorg.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T>- Throws:
IOException
-
restoreSerializer
public org.apache.flink.api.common.typeutils.TypeSerializer<T> restoreSerializer()
- Specified by:
restoreSerializerin interfaceorg.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T>
-
resolveSchemaCompatibility
public org.apache.flink.api.common.typeutils.TypeSerializerSchemaCompatibility<T> resolveSchemaCompatibility(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T> oldSerializerSnapshot)
- Specified by:
resolveSchemaCompatibilityin interfaceorg.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T>
-
isTtlEnabled
public boolean isTtlEnabled()
-
getOrinalTypeSerializerSnapshot
public org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<T> getOrinalTypeSerializerSnapshot()
-
-