Class EnumSetFieldSetMarshaller<E extends Enum<E>>

    • Constructor Detail

      • EnumSetFieldSetMarshaller

        public EnumSetFieldSetMarshaller()
    • Method Detail

      • getFields

        public int getFields()
        Description copied from interface: FieldReadable
        Returns the number of fields in this field set
        Specified by:
        getFields in interface FieldReadable<E extends Enum<E>>
        Returns:
        a number of fields
      • readFrom

        public EnumSetBuilder<E> readFrom​(ProtoStreamReader reader,
                                          int index,
                                          org.infinispan.protostream.descriptors.WireType type,
                                          EnumSetBuilder<E> builder)
                                   throws IOException
        Description copied from interface: FieldReadable
        Reads a single field from the specified reader.
        Specified by:
        readFrom in interface FieldReadable<E extends Enum<E>>
        Parameters:
        reader - a reader
        index - the zero-based index, relative to this field set, of the field to be read
        type - the wire type of the field to be read
        builder - the current value
        Returns:
        the read value
        Throws:
        IOException - if a field could not be read
      • writeTo

        public void writeTo​(ProtoStreamWriter writer,
                            EnumSet<E> set)
                     throws IOException
        Description copied from interface: Writable
        Writes the specified object to the specified writer.
        Specified by:
        writeTo in interface Writable<E extends Enum<E>>
        Parameters:
        writer - a ProtoStream writer
        set - the object to be written
        Throws:
        IOException - if the object could not be written