Class ByteBufferMarshalledValue<V>
java.lang.Object
org.wildfly.clustering.marshalling.ByteBufferMarshalledValue<V>
- Type Parameters:
V- the type wrapped by this marshalled value
- All Implemented Interfaces:
Serializable,MarshalledValue<V,ByteBufferMarshaller>
- Direct Known Subclasses:
ByteBufferMarshalledKey
public class ByteBufferMarshalledValue<V>
extends Object
implements MarshalledValue<V,ByteBufferMarshaller>, Serializable
MarshalledValue implementation that uses a ByteBufferMarshaller.- Author:
- Paul Ferraro
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionByteBufferMarshalledValue(ByteBuffer buffer) Constructs a marshalled value from the specified byte buffer.ByteBufferMarshalledValue(V object, ByteBufferMarshaller marshaller) Constructs a marshalled value from the specified object and marshaller. -
Method Summary
-
Constructor Details
-
ByteBufferMarshalledValue
Constructs a marshalled value from the specified object and marshaller.- Parameters:
object- the wrapped objectmarshaller- a marshaller suitable for marshalling the specified object
-
ByteBufferMarshalledValue
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 Details
-
isEmpty
public boolean isEmpty() -
getBuffer
- Throws:
IOException
-
size
-
get
Description copied from interface:MarshalledValueReturns the value, unmarshalling using the specified context if necessary.- Specified by:
getin interfaceMarshalledValue<V,ByteBufferMarshaller> - Parameters:
marshaller- a marshalling context- Returns:
- the value wrapped by this marshalled value.
- Throws:
IOException- if the value could not be unmarshalled.
-
hashCode
-
equals
-
toString
-