public class VersionAwareMarshaller extends AbstractMarshaller
CacheMarshaller200.
This delegating marshaller adds versioning information to the stream when marshalling objects and
is able to pick the appropriate marshaller to delegate to based on the versioning information when
unmarshalling objects.configuration, defaultClassLoader, defaultInactive, regionManager, trace, useRefs, useRegionBasedMarshalling| Constructor and Description |
|---|
VersionAwareMarshaller() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
getCustomMarshallerVersionInt() |
void |
initReplicationVersions() |
Object |
objectFromByteBuffer(byte[] bytes,
int offset,
int len) |
Object |
objectFromObjectStream(ObjectInputStream in)
Unmarshalls an object from an
ObjectInputStream |
Object |
objectFromStream(InputStream is)
Unmarshalls an object from an
InputStream |
ByteBuffer |
objectToBuffer(Object obj)
A specialized form of
RpcDispatcher.Marshaller2.objectToBuffer(Object) that returns an instance
of ByteBuffer instead of Buffer. |
void |
objectToObjectStream(Object obj,
ObjectOutputStream out)
Marshalls an object to a given
ObjectOutputStream |
void |
objectToObjectStream(Object obj,
ObjectOutputStream out,
Fqn region)
Overloaded form of
Marshaller.objectToObjectStream(Object,java.io.ObjectOutputStream) which adds a hint to the Fqn region |
RegionalizedMethodCall |
regionalizedMethodCallFromByteBuffer(byte[] buf)
Returns a RegionalizedMethodCall from a byte buffer.
|
extractFqn, init, initLogger, objectFromByteBuffer, objectToByteBuffer, regionalizedMethodCallFromObjectStreampublic void initReplicationVersions()
protected int getCustomMarshallerVersionInt()
public ByteBuffer objectToBuffer(Object obj) throws Exception
MarshallerRpcDispatcher.Marshaller2.objectToBuffer(Object) that returns an instance
of ByteBuffer instead of Buffer.objectToBuffer in interface MarshallerobjectToBuffer in interface org.jgroups.blocks.RpcDispatcher.Marshaller2objectToBuffer in class AbstractMarshallerobj - object to marshallExceptionpublic Object objectFromByteBuffer(byte[] bytes, int offset, int len) throws Exception
objectFromByteBuffer in interface org.jgroups.blocks.RpcDispatcher.Marshaller2objectFromByteBuffer in class AbstractMarshallerExceptionpublic RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buf) throws Exception
MarshallerRpcDispatcher.Marshaller.objectFromByteBuffer(byte[])regionalizedMethodCallFromByteBuffer in interface MarshallerregionalizedMethodCallFromByteBuffer in class AbstractMarshallerbuf - byte bufferException - if there are issuespublic Object objectFromStream(InputStream is) throws Exception
MarshallerInputStreamobjectFromStream in interface MarshallerobjectFromStream in class AbstractMarshalleris - stream to unmarshall fromExceptionpublic void objectToObjectStream(Object obj, ObjectOutputStream out, Fqn region) throws Exception
MarshallerMarshaller.objectToObjectStream(Object,java.io.ObjectOutputStream) which adds a hint to the Fqn regionobj - object to marshallout - stream to marshall toregion - fqn that this object pertains toExceptionpublic void objectToObjectStream(Object obj, ObjectOutputStream out) throws Exception
MarshallerObjectOutputStreamobj - object to marshallout - stream to marshall toExceptionpublic Object objectFromObjectStream(ObjectInputStream in) throws Exception
MarshallerObjectInputStreamin - stream to unmarshall fromExceptionCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.