Class ByteBufferMarshalledValue<T>
- java.lang.Object
-
- org.wildfly.clustering.marshalling.spi.ByteBufferMarshalledValue<T>
-
- Type Parameters:
T- the type wrapped by this marshalled value
- All Implemented Interfaces:
Serializable,MarshalledValue<T,ByteBufferMarshaller>
- Direct Known Subclasses:
ByteBufferMarshalledKey
public class ByteBufferMarshalledValue<T> extends Object implements MarshalledValue<T,ByteBufferMarshaller>, Serializable
MarshalledValueimplementation that uses aByteBufferMarshaller.- Author:
- Paul Ferraro
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteBufferMarshalledValue(ByteBuffer buffer)Constructs a marshalled value from the specified byte buffer.ByteBufferMarshalledValue(T object, ByteBufferMarshaller marshaller)Constructs a marshalled value from the specified object and marshaller.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Tget(ByteBufferMarshaller marshaller)ByteBuffergetBuffer()inthashCode()booleanisEmpty()OptionalIntsize()StringtoString()
-
-
-
Constructor Detail
-
ByteBufferMarshalledValue
public ByteBufferMarshalledValue(T object, ByteBufferMarshaller marshaller)
Constructs a marshalled value from the specified object and marshaller.- Parameters:
object- the wrapped objectmarshaller- a marshaller suitable for marshalling the specified object
-
ByteBufferMarshalledValue
public ByteBufferMarshalledValue(ByteBuffer buffer)
Constructs a marshalled value from the specified byte buffer. This constructor is only public to facilitate marshallers of this object (from other packages). The byte buffer parameter must not be read outside the context of this object.- Parameters:
buffer- a byte buffer
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
-
getBuffer
public ByteBuffer getBuffer() throws IOException
- Throws:
IOException
-
size
public OptionalInt size()
-
get
public T get(ByteBufferMarshaller marshaller) throws IOException
- Specified by:
getin interfaceMarshalledValue<T,ByteBufferMarshaller>- Throws:
IOException
-
-