Enum 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.
    • 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 name
        NullPointerException - if the argument is null
      • getVersion

        public int getVersion()
        Specified by:
        getVersion in interface org.apache.flink.core.io.SimpleVersionedSerializer<Void>
        Specified by:
        getVersion in interface org.apache.flink.core.io.Versioned
      • serialize

        public byte[] serialize​(Void obj)
                         throws IOException
        Specified by:
        serialize in interface org.apache.flink.core.io.SimpleVersionedSerializer<Void>
        Throws:
        IOException
      • deserialize

        public Void deserialize​(int version,
                                byte[] serialized)
                         throws IOException
        Specified by:
        deserialize in interface org.apache.flink.core.io.SimpleVersionedSerializer<Void>
        Throws:
        IOException