org.jboss.cache.marshall
Class AbstractMarshaller
java.lang.Object
org.jboss.cache.marshall.AbstractMarshaller
- All Implemented Interfaces:
- Marshaller, org.jgroups.blocks.RpcDispatcher.Marshaller
- Direct Known Subclasses:
- CacheMarshaller200, VersionAwareMarshaller
public abstract class AbstractMarshaller
- extends Object
- implements Marshaller
Abstract AbstractMarshaller for JBoss Cache.
- Author:
- Manik Surtani (manik@jboss.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
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
objectFromByteBuffer
public Object objectFromByteBuffer(byte[] bytes)
throws Exception
- Specified by:
objectFromByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller
- 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
extractFqnFromMethodCall
protected Fqn extractFqnFromMethodCall(MethodCall call)
- This is "replicate" call with a single MethodCall argument.
- Parameters:
call
-
extractFqnFromListOfMethodCall
protected Fqn extractFqnFromListOfMethodCall(MethodCall call)
- This is "replicate" call with a list of MethodCall argument.
- Parameters:
call
-
extractFqn
protected Fqn extractFqn(MethodCall methodCall)
getRegion
protected Region getRegion(Fqn fqn)
- Retrieves the
Region
from the RegionManager
after taking into account that this may be a Buddy Backup Fqn.
If the fqn passed in is null, the region has been deactivated or if a region cannot be found, this method returns a null.
- Parameters:
fqn
- of the region to locate
- Returns:
- a region
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.