T - the type of this marshallerpublic class ScalarFieldMarshaller<T> extends Object implements FieldMarshaller<T>
| Constructor and Description |
|---|
ScalarFieldMarshaller(ScalarMarshaller<T> marshaller) |
| Modifier and Type | Method and Description |
|---|---|
Class<? extends T> |
getJavaClass()
Returns the type of object handled by this marshallable instance.
|
int |
getWireType()
Returns the wire type of the scalar first value written by this marshaller.
|
T |
readFrom(ProtoStreamReader reader)
Reads an object from the specified reader.
|
OptionalInt |
size(org.infinispan.protostream.ImmutableSerializationContext context,
T value)
Predicts the size of the specified object that would be written via the
Marshallable.writeTo(ProtoStreamWriter, Object) method. |
void |
writeTo(ProtoStreamWriter writer,
T value)
Writes the specified object to the specified writer.
|
public ScalarFieldMarshaller(ScalarMarshaller<T> marshaller)
public T readFrom(ProtoStreamReader reader) throws IOException
MarshallablereadFrom in interface Marshallable<T>reader - a ProtoStream readerIOException - if the object could not be readpublic void writeTo(ProtoStreamWriter writer, T value) throws IOException
MarshallablewriteTo in interface Marshallable<T>writer - a ProtoStream writervalue - the object to be writtenIOException - if the object could not be writtenpublic OptionalInt size(org.infinispan.protostream.ImmutableSerializationContext context, T value)
MarshallableMarshallable.writeTo(ProtoStreamWriter, Object) method.size in interface Marshallable<T>context - a serialization contextvalue - the object whose size is to be determinedpublic Class<? extends T> getJavaClass()
MarshallablegetJavaClass in interface Marshallable<T>public int getWireType()
FieldMarshallergetWireType in interface FieldMarshaller<T>Copyright © 2021 JBoss by Red Hat. All rights reserved.