Interface ProtoStreamWriter
-
- All Superinterfaces:
ProtoStreamOperation,org.infinispan.protostream.RawProtoStreamWriter,org.infinispan.protostream.TagWriter
- All Known Implementing Classes:
AbstractProtoStreamWriter,DefaultProtoStreamWriter,SizeComputingProtoStreamWriter
public interface ProtoStreamWriter extends ProtoStreamOperation, org.infinispan.protostream.TagWriter
ATagWriterwith 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
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default ProtoStreamOperation.ContextgetContext()default voidwriteAny(int index, Object value)Writes the specified object of an abitrary type using the specified index.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.UseTagWriter.writeSFixed32(int, int)instead.voidwriteFixed64(int index, long value)Deprecated.Use#writeSFixed64(int, int)instead.voidwriteInt32(int index, int value)Deprecated.UseTagWriter.writeUInt32(int, int)orTagWriter.writeSInt32(int, int)voidwriteInt64(int index, long value)Deprecated.Use#writeUInt64(int, int)or#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.default voidwriteTag(int index, int wireType)Deprecated.UseTagWriter.writeTag(int, WireType)instead.-
Methods inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamOperation
findMarshaller, getSerializationContext
-
Methods inherited from interface org.infinispan.protostream.RawProtoStreamWriter
writeRawByte, writeRawBytes, writeUInt32NoTag, writeUInt64NoTag
-
Methods 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 Detail
-
getContext
default ProtoStreamOperation.Context getContext()
-
writeAny
default void writeAny(int index, Object value) throws IOExceptionWrites 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
default void writeObject(int index, Object value) throws IOExceptionWrites 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
-
writeObjectNoTag
void writeObjectNoTag(Object value) throws IOException
Writes the specified object. 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
default <E extends Enum<E>> void writeEnum(int index, E value) throws IOException
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 default void writeTag(int index, int wireType) throws IOException
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 void writeInt32(int index, int value) throws IOException
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 void writeInt64(int index, long value) throws IOException
Deprecated.Use#writeUInt64(int, int)or#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 void writeFixed32(int index, int value) throws IOException
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 void writeFixed64(int index, long value) throws IOException
Deprecated.Use#writeSFixed64(int, int)instead.Deprecated to discourage use.- Specified by:
writeFixed64in interfaceorg.infinispan.protostream.RawProtoStreamWriter- Specified by:
writeFixed64in interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
-