org.jboss.cache.marshall
Class AbstractMarshaller
java.lang.Object
org.jboss.cache.marshall.AbstractMarshaller
- All Implemented Interfaces:
- Marshaller, org.jgroups.blocks.RpcDispatcher.Marshaller, org.jgroups.blocks.RpcDispatcher.Marshaller2
- Direct Known Subclasses:
- CacheMarshaller200, VersionAwareMarshaller
public abstract class AbstractMarshaller
- extends Object
- implements Marshaller
Abstract AbstractMarshaller for JBoss Cache.
- Author:
- Manik Surtani (manik AT jboss DOT org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
useRegionBasedMarshalling
protected boolean useRegionBasedMarshalling
regionManager
protected RegionManager regionManager
defaultInactive
protected boolean defaultInactive
log
protected org.apache.commons.logging.Log log
trace
protected boolean trace
configuration
protected Configuration configuration
defaultClassLoader
protected ClassLoader defaultClassLoader
useRefs
protected boolean useRefs
AbstractMarshaller
public AbstractMarshaller()
init
protected void init()
initLogger
protected void initLogger()
objectToByteBuffer
public byte[] objectToByteBuffer(Object obj)
throws Exception
- Specified by:
objectToByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller
- Throws:
Exception
objectToBuffer
public ByteBuffer objectToBuffer(Object o)
throws Exception
- Description copied from interface:
Marshaller
- A specialized form of
RpcDispatcher.Marshaller2.objectToBuffer(Object)
that returns an instance
of ByteBuffer
instead of Buffer
.
- Specified by:
objectToBuffer
in interface Marshaller
- Specified by:
objectToBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller2
- Parameters:
o
- object to marshall
- Returns:
- a ByteBuffer
- Throws:
Exception
objectFromByteBuffer
public Object objectFromByteBuffer(byte[] bytes)
throws Exception
- Specified by:
objectFromByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller
- Throws:
Exception
objectFromByteBuffer
public Object objectFromByteBuffer(byte[] bytes,
int offset,
int len)
throws Exception
- Specified by:
objectFromByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller2
- Throws:
Exception
objectFromStream
public Object objectFromStream(InputStream in)
throws Exception
- Description copied from interface:
Marshaller
- Unmarshalls an object from an
InputStream
- Specified by:
objectFromStream
in interface Marshaller
- Parameters:
in
- stream to unmarshall from
- Returns:
- Object from stream passed in.
- Throws:
Exception
regionalizedMethodCallFromByteBuffer
public RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buffer)
throws Exception
- Description copied from interface:
Marshaller
- Returns a RegionalizedMethodCall from a byte buffer. Only use if you know that the byte buffer contains a
MethodCall and that you are using region-based marshalling, otherwise use
RpcDispatcher.Marshaller.objectFromByteBuffer(byte[])
- Specified by:
regionalizedMethodCallFromByteBuffer
in interface Marshaller
- Parameters:
buffer
- byte buffer
- Returns:
- a RegionalizedMethodCall
- Throws:
Exception
- if there are issues
regionalizedMethodCallFromObjectStream
public RegionalizedMethodCall regionalizedMethodCallFromObjectStream(ObjectInputStream in)
throws Exception
- Description copied from interface:
Marshaller
- Returns a RegionalizedMethodCall from an object input stream. Only use if you know that the byte buffer contains a
MethodCall and that you are using region-based marshalling, otherwise use
Marshaller.objectFromObjectStream(java.io.ObjectInputStream)
- Specified by:
regionalizedMethodCallFromObjectStream
in interface Marshaller
- Parameters:
in
- object inout stream
- Returns:
- a RegionalizedMethodCall
- Throws:
Exception
- if there are issues
extractFqn
protected Fqn extractFqn(ReplicableCommand cmd)
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.