Class ProtoStreamByteBufferMarshaller
java.lang.Object
org.wildfly.clustering.marshalling.protostream.ProtoStreamByteBufferMarshaller
- All Implemented Interfaces:
Predicate<Object>, Predicate<Object>, ByteBufferMarshaller, Marshaller<Object, ByteBuffer>
A ProtoStream byte buffer marshaller.
- Author:
- Paul Ferraro
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionProtoStreamByteBufferMarshaller(org.infinispan.protostream.ImmutableSerializationContext context) Constructs a new ProtoStream marshaller using the specified context -
Method Summary
Modifier and TypeMethodDescriptionreadFrom(InputStream input) Reads an object from the specified input stream.Returns the marshalled size of the specified object.booleantoString()voidwriteTo(OutputStream output, Object object) Writes the specified object to the specified output stream.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ByteBufferMarshaller
read, writeMethods inherited from interface Predicate
and, compose, composeBinary, composeDouble, composeInt, composeLong, handle, negate, or, xor
-
Constructor Details
-
ProtoStreamByteBufferMarshaller
public ProtoStreamByteBufferMarshaller(org.infinispan.protostream.ImmutableSerializationContext context) Constructs a new ProtoStream marshaller using the specified context- Parameters:
context- a serialization context
-
-
Method Details
-
size
Description copied from interface:ByteBufferMarshallerReturns the marshalled size of the specified object.- Specified by:
sizein interfaceByteBufferMarshaller- Parameters:
object- the object whose marshalled size is to be computed- Returns:
- the marshalled size of the specified object.
-
test
-
readFrom
Description copied from interface:ByteBufferMarshallerReads an object from the specified input stream.- Specified by:
readFromin interfaceByteBufferMarshaller- Parameters:
input- an input stream- Returns:
- the unmarshalled object
- Throws:
IOException- if the object could not be read
-
writeTo
Description copied from interface:ByteBufferMarshallerWrites the specified object to the specified output stream.- Specified by:
writeToin interfaceByteBufferMarshaller- Parameters:
output- an output streamobject- an object to marshal- Throws:
IOException- if the object could not be written
-
toString
-