Interface ProtoStreamWriter
- All Superinterfaces:
ProtoStreamOperation,org.infinispan.protostream.TagWriter
- All Known Implementing Classes:
AbstractProtoStreamWriter,DefaultProtoStreamWriter,OffsetProtoStreamWriter,SizeComputingProtoStreamWriter
public interface ProtoStreamWriter
extends ProtoStreamOperation, org.infinispan.protostream.TagWriter
A
TagWriter with the additional ability to write an arbitrary embedded object.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.wildfly.clustering.marshalling.protostream.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.default voidWrites the specified object of an abitrary type using the specified index.voidwriteAnyNoTag(Object value) Writes the specified object of an arbitrary type.default <E extends Enum<E>>
voidwriteEnum(int index, E value) Writes the specified enum field using the specified index.voidwriteFixed32(int index, int value) Deprecated.voidwriteFixed64(int index, long value) Deprecated.UseTagWriter.writeSFixed64(int, long)instead.voidwriteInt32(int index, int value) Deprecated.UseTagWriter.writeUInt32(int, int)orTagWriter.writeSInt32(int, int)voidwriteInt64(int index, long value) Deprecated.UseTagWriter.writeUInt64(int, long)orTagWriter.writeSInt64(int, long)default voidwriteObject(int index, Object value) Writes the specified object of a specific type using the specified index.voidwriteObjectNoTag(Object value) Writes the specified object of a specific type.default voidwriteTag(int index, int wireType) Deprecated.UseTagWriter.writeTag(int, WireType)instead.Methods inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamOperation
findMarshaller, getContext, getSerializationContextMethods inherited from interface org.infinispan.protostream.TagWriter
flush, writeBool, writeBytes, writeBytes, writeBytes, writeDouble, writeEnum, writeFloat, writeRawBytes, writeSFixed32, writeSFixed64, writeSInt32, writeSInt64, writeString, writeTag, writeUInt32, writeUInt64, writeVarint32, writeVarint64
-
Method Details
-
createFieldSetWriter
Creates a writer for a set of consecutive fields.- 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.
-
writeAny
Writes the specified object of an abitrary type using the specified index. Object will be read viaProtoStreamReader.readAny().- Parameters:
index- a field indexvalue- 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
-
writeObject
Writes the specified object of a specific type using the specified index. Object will be read viaProtoStreamReader.readObject(Class).- Parameters:
index- a field indexvalue- 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
-
writeAnyNoTag
Writes the specified object of an arbitrary type. Must be preceded by {TagWriter.writeTag(int, org.infinispan.protostream.descriptors.WireType).- 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
Writes the specified object of a specific type. Must be preceded by {TagWriter.writeTag(int, org.infinispan.protostream.descriptors.WireType).- 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
-
writeEnum
Writes the specified enum field using the specified index. Object will be read viaProtoStreamReader.readEnum(Class).- Parameters:
index- a field indexvalue- an enum 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
-
writeTag
Deprecated.UseTagWriter.writeTag(int, WireType)instead.Deprecated to discourage use.- Specified by:
writeTagin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeInt32
Deprecated.UseTagWriter.writeUInt32(int, int)orTagWriter.writeSInt32(int, int)Deprecated to discourage use.- Specified by:
writeInt32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeInt64
Deprecated.UseTagWriter.writeUInt64(int, long)orTagWriter.writeSInt64(int, long)Deprecated to discourage use.- Specified by:
writeInt64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeFixed32
Deprecated.UseTagWriter.writeSFixed32(int, int)instead.Deprecated to discourage use.- Specified by:
writeFixed32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeFixed64
Deprecated.UseTagWriter.writeSFixed64(int, long)instead.Deprecated to discourage use.- Specified by:
writeFixed64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
TagWriter.writeSFixed32(int, int)instead.