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 java.lang.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 java.lang.ClassLoader defaultClassLoader
useRefs
protected boolean useRefs
AbstractMarshaller
public AbstractMarshaller()
init
protected void init()
initLogger
protected void initLogger()
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
objectToBuffer
public ByteBuffer objectToBuffer(java.lang.Object o)
throws java.lang.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:
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
objectFromByteBuffer
public java.lang.Object objectFromByteBuffer(byte[] bytes,
int offset,
int len)
throws java.lang.Exception
- Specified by:
objectFromByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller2
- 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
regionalizedMethodCallFromByteBuffer
public RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buffer)
throws java.lang.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:
java.lang.Exception
- if there are issues
regionalizedMethodCallFromObjectStream
public RegionalizedMethodCall regionalizedMethodCallFromObjectStream(java.io.ObjectInputStream in)
throws java.lang.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:
java.lang.Exception
- if there are issues
extractFqn
protected Fqn extractFqn(ReplicableCommand cmd)
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.