Class OffsetProtoStreamWriter
java.lang.Object
org.wildfly.clustering.marshalling.protostream.OffsetProtoStreamWriter
- All Implemented Interfaces:
AutoCloseable, org.infinispan.protostream.TagWriter, ProtoStreamOperation, ProtoStreamWriter
A ProtoStream writer that applies an offset to its fields.
- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from interface ProtoStreamOperation
ProtoStreamOperation.Context -
Method Summary
Modifier and TypeMethodDescription<T> FieldSetWriter<T> createFieldSetWriter(Writable<T> writer, int startIndex) Creates a writer for a set of consecutive fields.voidflush()Returns the context of this operationorg.infinispan.protostream.ImmutableSerializationContextReturns the serialization context of the associated marshaller.org.infinispan.protostream.TagWritersubWriter(int index, boolean nested) voidwriteAnyNoTag(Object value) Writes the specified object of an arbitrary type.voidwriteBool(int number, boolean value) voidwriteBytes(int number, byte[] value) voidwriteBytes(int number, byte[] value, int offset, int length) voidwriteBytes(int number, ByteBuffer value) voidwriteDouble(int number, double value) voidwriteEnum(int number, int value) voidwriteFixed32(int index, int value) Deprecated.voidwriteFixed64(int index, long value) Deprecated.voidwriteFloat(int number, float value) voidwriteInt32(int index, int value) Deprecated.voidwriteInt64(int index, long value) Deprecated.voidwriteObjectNoTag(Object value) Writes the specified object of a specific type.voidwriteRawBytes(byte[] value, int offset, int length) voidwriteSFixed32(int number, int value) voidwriteSFixed64(int number, long value) voidwriteSInt32(int number, int value) voidwriteSInt64(int number, long value) voidwriteString(int number, String value) voidwriteTag(int number, org.infinispan.protostream.descriptors.WireType wireType) voidwriteUInt32(int number, int value) voidwriteUInt64(int number, long value) voidwriteVarint32(int value) voidwriteVarint64(long value) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ProtoStreamOperation
findMarshallerMethods inherited from interface ProtoStreamWriter
writeAny, writeEnum, writeObject, writeObject, writeTagMethods inherited from interface org.infinispan.protostream.TagWriter
close
-
Method Details
-
createFieldSetWriter
Description copied from interface:ProtoStreamWriterCreates a writer for a set of consecutive fields.- Specified by:
createFieldSetWriterin interfaceProtoStreamWriter- Type Parameters:
T- the type encapsulated by this field set- Parameters:
writer- the marshaller used to write the set of fieldsstartIndex- the starting index of this field set- Returns:
- a writer for a set of consecutive fields.
-
getContext
Description copied from interface:ProtoStreamOperationReturns the context of this operation- Specified by:
getContextin interfaceProtoStreamOperation- Returns:
- the operation context
-
getSerializationContext
public org.infinispan.protostream.ImmutableSerializationContext getSerializationContext()Description copied from interface:ProtoStreamOperationReturns the serialization context of the associated marshaller.- Specified by:
getSerializationContextin interfaceProtoStreamOperation- Returns:
- an immutable serialization context
-
flush
- Specified by:
flushin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeTag
public void writeTag(int number, org.infinispan.protostream.descriptors.WireType wireType) throws IOException - Specified by:
writeTagin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeVarint32
- Specified by:
writeVarint32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeVarint64
- Specified by:
writeVarint64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeRawBytes
- Specified by:
writeRawBytesin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeString
- Specified by:
writeStringin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeUInt32
- Specified by:
writeUInt32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeSInt32
- Specified by:
writeSInt32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeSFixed32
- Specified by:
writeSFixed32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeUInt64
- Specified by:
writeUInt64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeSInt64
- Specified by:
writeSInt64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeSFixed64
- Specified by:
writeSFixed64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeEnum
- Specified by:
writeEnumin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeBool
- Specified by:
writeBoolin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeDouble
- Specified by:
writeDoublein interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeFloat
- Specified by:
writeFloatin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeAnyNoTag
Description copied from interface:ProtoStreamWriterWrites the specified object of an arbitrary type. Must be preceded by {TagWriter.writeTag(int, org.infinispan.protostream.descriptors.WireType).- Specified by:
writeAnyNoTagin interfaceProtoStreamWriter- 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
Description copied from interface:ProtoStreamWriterWrites the specified object of a specific type. Must be preceded by {TagWriter.writeTag(int, org.infinispan.protostream.descriptors.WireType).- Specified by:
writeObjectNoTagin interfaceProtoStreamWriter- 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.Description copied from interface:ProtoStreamWriterDeprecated to discourage use.- Specified by:
writeInt32in interfaceProtoStreamWriter- Specified by:
writeInt32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeInt64
Deprecated.Description copied from interface:ProtoStreamWriterDeprecated to discourage use.- Specified by:
writeInt64in interfaceProtoStreamWriter- Specified by:
writeInt64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeFixed32
Deprecated.Description copied from interface:ProtoStreamWriterDeprecated to discourage use.- Specified by:
writeFixed32in interfaceProtoStreamWriter- Specified by:
writeFixed32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeFixed64
Deprecated.Description copied from interface:ProtoStreamWriterDeprecated to discourage use.- Specified by:
writeFixed64in interfaceProtoStreamWriter- Specified by:
writeFixed64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
subWriter
- Specified by:
subWriterin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-