Class AbstractByteBufferMarshaller
java.lang.Object
org.wildfly.clustering.marshalling.AbstractByteBufferMarshaller
- All Implemented Interfaces:
Predicate<Object>, Predicate<Object>, ByteBufferMarshaller, Marshaller<Object, ByteBuffer>
- Direct Known Subclasses:
JavaByteBufferMarshaller, JBossByteBufferMarshaller
An abstract byte buffer marshaller that performs read/writing within a specified ClassLoader context.
- Author:
- Paul Ferraro
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a new byte buffer marshaller using the specified context class loader. -
Method Summary
Modifier and TypeMethodDescriptionread(ByteBuffer buffer) Reads a value from its marshalled form.Returns the marshalled size of the specified object.Writes a value to its serialized formMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ByteBufferMarshaller
readFrom, writeToMethods inherited from interface Predicate
and, compose, composeBinary, composeDouble, composeInt, composeLong, handle, negate, or, xor
-
Constructor Details
-
AbstractByteBufferMarshaller
Constructs a new byte buffer marshaller using the specified context class loader.- Parameters:
loader- a context class loader
-
-
Method Details
-
read
Description copied from interface:MarshallerReads a value from its marshalled form.- Specified by:
readin interfaceByteBufferMarshaller- Specified by:
readin interfaceMarshaller<Object, ByteBuffer>- Parameters:
buffer- the marshalled form- Returns:
- an unmarshalled value
- Throws:
IOException- if the value could not be read
-
write
Description copied from interface:MarshallerWrites a value to its serialized form- Specified by:
writein interfaceByteBufferMarshaller- Specified by:
writein interfaceMarshaller<Object, ByteBuffer>- Parameters:
object- a value to marshal.- Returns:
- the serialized form of the value
- Throws:
IOException- if the value could not be written
-
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.
-