Interface ProtoStreamWriter
- All Superinterfaces:
ProtoStreamOperation,org.infinispan.protostream.RawProtoStreamWriter,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) 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, int)instead.voidwriteInt32(int index, int value) Deprecated.UseTagWriter.writeUInt32(int, int)orTagWriter.writeSInt32(int, int)voidwriteInt64(int index, long value) Deprecated.UseTagWriter.writeUInt64(int, int)orTagWriter.writeSInt64(int, int)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.RawProtoStreamWriter
writeRawByte, writeRawBytes, writeUInt32NoTag, writeUInt64NoTagMethods 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
-
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.RawProtoStreamWriter- 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.RawProtoStreamWriter- Specified by:
writeInt32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeInt64
Deprecated.UseTagWriter.writeUInt64(int, int)orTagWriter.writeSInt64(int, int)Deprecated to discourage use.- Specified by:
writeInt64in interfaceorg.infinispan.protostream.RawProtoStreamWriter- 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.RawProtoStreamWriter- Specified by:
writeFixed32in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeFixed64
Deprecated.UseTagWriter.writeSFixed64(int, int)instead.Deprecated to discourage use.- Specified by:
writeFixed64in interfaceorg.infinispan.protostream.RawProtoStreamWriter- Specified by:
writeFixed64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
TagWriter.writeSFixed32(int, int)instead.