Class EnumSerializer<T extends Enum<T>>
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.TypeSerializer<T>
-
- org.apache.flink.cdc.runtime.serializer.EnumSerializer<T>
-
- All Implemented Interfaces:
Serializable
public final class EnumSerializer<T extends Enum<T>> extends org.apache.flink.api.common.typeutils.TypeSerializer<T>TypeSerializerfor Java enums.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEnumSerializer.EnumSerializerSnapshot<T extends Enum<T>>TypeSerializerSnapshotforEnumSerializer.
-
Constructor Summary
Constructors Constructor Description EnumSerializer(Class<T> enumClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy(org.apache.flink.core.memory.DataInputView source, org.apache.flink.core.memory.DataOutputView target)Tcopy(T from)Tcopy(T from, T reuse)TcreateInstance()Tdeserialize(org.apache.flink.core.memory.DataInputView source)Tdeserialize(T reuse, org.apache.flink.core.memory.DataInputView source)EnumSerializer<T>duplicate()booleanequals(Object obj)intgetLength()inthashCode()booleanisImmutableType()voidserialize(T record, org.apache.flink.core.memory.DataOutputView target)EnumSerializer.EnumSerializerSnapshot<T>snapshotConfiguration()StringtoString()
-
-
-
Method Detail
-
isImmutableType
public boolean isImmutableType()
-
duplicate
public EnumSerializer<T> duplicate()
-
createInstance
public T createInstance()
-
getLength
public int getLength()
-
serialize
public void serialize(T record, org.apache.flink.core.memory.DataOutputView target) throws IOException
- Specified by:
serializein classorg.apache.flink.api.common.typeutils.TypeSerializer<T extends Enum<T>>- Throws:
IOException
-
deserialize
public T deserialize(org.apache.flink.core.memory.DataInputView source) throws IOException
- Specified by:
deserializein classorg.apache.flink.api.common.typeutils.TypeSerializer<T extends Enum<T>>- Throws:
IOException
-
deserialize
public T deserialize(T reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
- Specified by:
deserializein classorg.apache.flink.api.common.typeutils.TypeSerializer<T extends Enum<T>>- Throws:
IOException
-
copy
public void copy(org.apache.flink.core.memory.DataInputView source, org.apache.flink.core.memory.DataOutputView target) throws IOException- Specified by:
copyin classorg.apache.flink.api.common.typeutils.TypeSerializer<T extends Enum<T>>- Throws:
IOException
-
equals
public boolean equals(Object obj)
-
hashCode
public int hashCode()
-
snapshotConfiguration
public EnumSerializer.EnumSerializerSnapshot<T> snapshotConfiguration()
-
-