Class AbstractProtoStreamWriter
java.lang.Object
org.wildfly.clustering.marshalling.protostream.AbstractProtoStreamOperation
org.wildfly.clustering.marshalling.protostream.AbstractProtoStreamWriter
- All Implemented Interfaces:
org.infinispan.protostream.ProtobufTagMarshaller.OperationContext,org.infinispan.protostream.ProtobufTagMarshaller.WriteContext,org.infinispan.protostream.TagWriter,ProtoStreamOperation,ProtoStreamWriter
- Direct Known Subclasses:
DefaultProtoStreamWriter,SizeComputingProtoStreamWriter
public abstract class AbstractProtoStreamWriter
extends AbstractProtoStreamOperation
implements ProtoStreamWriter, org.infinispan.protostream.ProtobufTagMarshaller.WriteContext
Delegates most
ProtoStreamWriter operations to a TagWriter.- 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.intdepth()voidflush()Returns the context of this operationorg.infinispan.protostream.TagWritervoidwriteAnyNoTag(Object value) Writes the specified object of an arbitrary type.voidwriteBool(int index, boolean value) voidwriteBytes(int index, byte[] value) voidwriteBytes(int index, byte[] value, int offset, int length) voidwriteBytes(int index, ByteBuffer value) voidwriteDouble(int index, double value) voidwriteEnum(int index, int value) voidwriteFixed32(int index, int value) Deprecated.voidwriteFixed64(int index, long value) Deprecated.voidwriteFloat(int index, float value) voidwriteInt32(int index, int value) Deprecated.voidwriteInt64(int index, long value) Deprecated.voidwriteRawBytes(byte[] value, int offset, int length) voidwriteSFixed32(int index, int value) voidwriteSFixed64(int index, long value) voidwriteSInt32(int index, int value) voidwriteSInt64(int index, long value) voidwriteString(int index, String value) voidwriteTag(int number, org.infinispan.protostream.descriptors.WireType wireType) voidwriteUInt32(int index, int value) voidwriteUInt64(int index, long value) voidwriteVarint32(int value) voidwriteVarint64(long value) Methods inherited from class org.wildfly.clustering.marshalling.protostream.AbstractProtoStreamOperation
getParam, getSerializationContext, setParamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.protostream.ProtobufTagMarshaller.OperationContext
getParam, getSerializationContext, setParamMethods inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamOperation
findMarshaller, getSerializationContextMethods inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamWriter
writeAny, writeEnum, writeObject, writeObjectNoTag, writeTag
-
Method Details
-
getContext
Description copied from interface:ProtoStreamOperationReturns the context of this operation- Specified by:
getContextin interfaceProtoStreamOperation- Returns:
- the operation context
-
getWriter
public org.infinispan.protostream.TagWriter getWriter()- Specified by:
getWriterin interfaceorg.infinispan.protostream.ProtobufTagMarshaller.WriteContext
-
depth
public int depth()- Specified by:
depthin interfaceorg.infinispan.protostream.ProtobufTagMarshaller.WriteContext
-
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.
-
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
-
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
-
writeBool
- Specified by:
writeBoolin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeEnum
- Specified by:
writeEnumin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeInt32
Deprecated.Description copied from interface:ProtoStreamWriterDeprecated to discourage use.- Specified by:
writeInt32in interfaceProtoStreamWriter- Specified by:
writeInt32in 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
-
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
-
writeInt64
Deprecated.Description copied from interface:ProtoStreamWriterDeprecated to discourage use.- Specified by:
writeInt64in interfaceProtoStreamWriter- Specified by:
writeInt64in 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
-
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
-
writeFloat
- Specified by:
writeFloatin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
writeDouble
- Specified by:
writeDoublein 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
-
writeString
- Specified by:
writeStringin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceorg.infinispan.protostream.TagWriter- Throws:
IOException
-