Enum VoidSerializer
- java.lang.Object
-
- java.lang.Enum<VoidSerializer>
-
- org.apache.flink.test.util.source.VoidSerializer
-
- All Implemented Interfaces:
Serializable,Comparable<VoidSerializer>,org.apache.flink.core.io.SimpleVersionedSerializer<Void>,org.apache.flink.core.io.Versioned
public enum VoidSerializer extends Enum<VoidSerializer> implements org.apache.flink.core.io.SimpleVersionedSerializer<Void>
A serializer for Void checkpoint states. This is useful for test sources that don't need to store any checkpoint state. The serializer always returns null during deserialization and stores no data during serialization.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Voiddeserialize(int version, byte[] serialized)intgetVersion()byte[]serialize(Void obj)static VoidSerializervalueOf(String name)Returns the enum constant of this type with the specified name.static VoidSerializer[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final VoidSerializer INSTANCE
-
-
Method Detail
-
values
public static VoidSerializer[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (VoidSerializer c : VoidSerializer.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VoidSerializer valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getVersion
public int getVersion()
- Specified by:
getVersionin interfaceorg.apache.flink.core.io.SimpleVersionedSerializer<Void>- Specified by:
getVersionin interfaceorg.apache.flink.core.io.Versioned
-
serialize
public byte[] serialize(Void obj) throws IOException
- Specified by:
serializein interfaceorg.apache.flink.core.io.SimpleVersionedSerializer<Void>- Throws:
IOException
-
deserialize
public Void deserialize(int version, byte[] serialized) throws IOException
- Specified by:
deserializein interfaceorg.apache.flink.core.io.SimpleVersionedSerializer<Void>- Throws:
IOException
-
-