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 java.lang.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
AbstractMarshaller
public AbstractMarshaller()
init
protected void init(RegionManager manager,
boolean defaultInactive,
boolean useRegionBasedMarshalling)
objectToByteBuffer
public byte[] objectToByteBuffer(java.lang.Object obj)
throws java.lang.Exception
- Specified by:
objectToByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller
- Throws:
java.lang.Exception
objectFromByteBuffer
public java.lang.Object objectFromByteBuffer(byte[] bytes)
throws java.lang.Exception
- Specified by:
objectFromByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller
- Throws:
java.lang.Exception
objectFromStream
public java.lang.Object objectFromStream(java.io.InputStream in)
throws java.lang.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:
java.lang.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