Class OffsetProtoStreamWriter

java.lang.Object
org.wildfly.clustering.marshalling.protostream.OffsetProtoStreamWriter
All Implemented Interfaces:
org.infinispan.protostream.RawProtoStreamWriter, org.infinispan.protostream.TagWriter, ProtoStreamOperation, ProtoStreamWriter

public class OffsetProtoStreamWriter extends Object implements ProtoStreamWriter
Author:
Paul Ferraro
  • Method Details

    • createFieldSetWriter

      public <T> FieldSetWriter<T> createFieldSetWriter(Writable<T> writer, int startIndex)
      Specified by:
      createFieldSetWriter in interface ProtoStreamWriter
    • getContext

      public ProtoStreamOperation.Context getContext()
      Description copied from interface: ProtoStreamOperation
      Returns the context of this operation
      Specified by:
      getContext in interface ProtoStreamOperation
      Returns:
      the operation context
    • getSerializationContext

      public org.infinispan.protostream.ImmutableSerializationContext getSerializationContext()
      Description copied from interface: ProtoStreamOperation
      Returns the serialization context of the associated marshaller.
      Specified by:
      getSerializationContext in interface ProtoStreamOperation
      Returns:
      an immutable serialization context
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      flush in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeTag

      public void writeTag(int number, org.infinispan.protostream.descriptors.WireType wireType) throws IOException
      Specified by:
      writeTag in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeTag in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeVarint32

      public void writeVarint32(int value) throws IOException
      Specified by:
      writeVarint32 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeVarint32 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeVarint64

      public void writeVarint64(long value) throws IOException
      Specified by:
      writeVarint64 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeVarint64 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeRawBytes

      public void writeRawBytes(byte[] value, int offset, int length) throws IOException
      Specified by:
      writeRawBytes in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeRawBytes in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeString

      public void writeString(int number, String value) throws IOException
      Specified by:
      writeString in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeString in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeUInt32

      public void writeUInt32(int number, int value) throws IOException
      Specified by:
      writeUInt32 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeUInt32 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeSInt32

      public void writeSInt32(int number, int value) throws IOException
      Specified by:
      writeSInt32 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeSInt32 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeSFixed32

      public void writeSFixed32(int number, int value) throws IOException
      Specified by:
      writeSFixed32 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeSFixed32 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeUInt64

      public void writeUInt64(int number, long value) throws IOException
      Specified by:
      writeUInt64 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeUInt64 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeSInt64

      public void writeSInt64(int number, long value) throws IOException
      Specified by:
      writeSInt64 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeSInt64 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeSFixed64

      public void writeSFixed64(int number, long value) throws IOException
      Specified by:
      writeSFixed64 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeSFixed64 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeEnum

      public void writeEnum(int number, int value) throws IOException
      Specified by:
      writeEnum in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeEnum in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeBool

      public void writeBool(int number, boolean value) throws IOException
      Specified by:
      writeBool in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeBool in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeDouble

      public void writeDouble(int number, double value) throws IOException
      Specified by:
      writeDouble in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeDouble in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeFloat

      public void writeFloat(int number, float value) throws IOException
      Specified by:
      writeFloat in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeFloat in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeBytes

      public void writeBytes(int number, ByteBuffer value) throws IOException
      Specified by:
      writeBytes in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeBytes in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeBytes

      public void writeBytes(int number, byte[] value) throws IOException
      Specified by:
      writeBytes in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeBytes in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeBytes

      public void writeBytes(int number, byte[] value, int offset, int length) throws IOException
      Specified by:
      writeBytes in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeBytes in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeRawByte

      @Deprecated public void writeRawByte(byte value) throws IOException
      Deprecated.
      Specified by:
      writeRawByte in interface org.infinispan.protostream.RawProtoStreamWriter
      Throws:
      IOException
    • writeRawBytes

      @Deprecated public void writeRawBytes(ByteBuffer value) throws IOException
      Deprecated.
      Specified by:
      writeRawBytes in interface org.infinispan.protostream.RawProtoStreamWriter
      Throws:
      IOException
    • writeAnyNoTag

      public void writeAnyNoTag(Object value) throws IOException
      Description copied from interface: ProtoStreamWriter
      Writes the specified object of an arbitrary type. Must be preceded by {TagWriter.writeTag(int, org.infinispan.protostream.descriptors.WireType).
      Specified by:
      writeAnyNoTag in interface ProtoStreamWriter
      Parameters:
      value - a value to be written
      Throws:
      IOException - if no marshaller is associated with the type of the specified object, or if the marshaller fails to write the specified object
    • writeObjectNoTag

      public void writeObjectNoTag(Object value) throws IOException
      Description copied from interface: ProtoStreamWriter
      Writes the specified object of a specific type. Must be preceded by {TagWriter.writeTag(int, org.infinispan.protostream.descriptors.WireType).
      Specified by:
      writeObjectNoTag in interface ProtoStreamWriter
      Parameters:
      value - a value to be written
      Throws:
      IOException - if no marshaller is associated with the type of the specified object, or if the marshaller fails to write the specified object
    • writeInt32

      @Deprecated public void writeInt32(int index, int value) throws IOException
      Deprecated.
      Description copied from interface: ProtoStreamWriter
      Deprecated to discourage use.
      Specified by:
      writeInt32 in interface ProtoStreamWriter
      Specified by:
      writeInt32 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeInt32 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeInt64

      @Deprecated public void writeInt64(int index, long value) throws IOException
      Deprecated.
      Description copied from interface: ProtoStreamWriter
      Deprecated to discourage use.
      Specified by:
      writeInt64 in interface ProtoStreamWriter
      Specified by:
      writeInt64 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeInt64 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeFixed32

      @Deprecated public void writeFixed32(int index, int value) throws IOException
      Deprecated.
      Description copied from interface: ProtoStreamWriter
      Deprecated to discourage use.
      Specified by:
      writeFixed32 in interface ProtoStreamWriter
      Specified by:
      writeFixed32 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeFixed32 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException
    • writeFixed64

      @Deprecated public void writeFixed64(int index, long value) throws IOException
      Deprecated.
      Description copied from interface: ProtoStreamWriter
      Deprecated to discourage use.
      Specified by:
      writeFixed64 in interface ProtoStreamWriter
      Specified by:
      writeFixed64 in interface org.infinispan.protostream.RawProtoStreamWriter
      Specified by:
      writeFixed64 in interface org.infinispan.protostream.TagWriter
      Throws:
      IOException