org.jboss.cache.marshall
Class CacheMarshaller200
java.lang.Object
org.jboss.cache.marshall.AbstractMarshaller
org.jboss.cache.marshall.CacheMarshaller200
- All Implemented Interfaces:
- Marshaller, org.jgroups.blocks.RpcDispatcher.Marshaller
- Direct Known Subclasses:
- CacheMarshaller210
public class CacheMarshaller200
- extends AbstractMarshaller
An enhanced marshaller for RPC calls between CacheImpl instances.
- Author:
- Manik Surtani (manik@jboss.org)
Methods inherited from class org.jboss.cache.marshall.AbstractMarshaller |
extractFqn, extractFqnFromListOfMethodCall, extractFqnFromMethodCall, getRegion, init, initLogger, objectFromByteBuffer, objectFromStream, objectToByteBuffer, objectToByteBuffer, regionalizedMethodCallFromByteBuffer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAGICNUMBER_METHODCALL
protected static final int MAGICNUMBER_METHODCALL
- See Also:
- Constant Field Values
MAGICNUMBER_FQN
protected static final int MAGICNUMBER_FQN
- See Also:
- Constant Field Values
MAGICNUMBER_GTX
protected static final int MAGICNUMBER_GTX
- See Also:
- Constant Field Values
MAGICNUMBER_IPADDRESS
protected static final int MAGICNUMBER_IPADDRESS
- See Also:
- Constant Field Values
MAGICNUMBER_ARRAY_LIST
protected static final int MAGICNUMBER_ARRAY_LIST
- See Also:
- Constant Field Values
MAGICNUMBER_INTEGER
protected static final int MAGICNUMBER_INTEGER
- See Also:
- Constant Field Values
MAGICNUMBER_LONG
protected static final int MAGICNUMBER_LONG
- See Also:
- Constant Field Values
MAGICNUMBER_BOOLEAN
protected static final int MAGICNUMBER_BOOLEAN
- See Also:
- Constant Field Values
MAGICNUMBER_STRING
protected static final int MAGICNUMBER_STRING
- See Also:
- Constant Field Values
MAGICNUMBER_DEFAULT_DATA_VERSION
protected static final int MAGICNUMBER_DEFAULT_DATA_VERSION
- See Also:
- Constant Field Values
MAGICNUMBER_LINKED_LIST
protected static final int MAGICNUMBER_LINKED_LIST
- See Also:
- Constant Field Values
MAGICNUMBER_HASH_MAP
protected static final int MAGICNUMBER_HASH_MAP
- See Also:
- Constant Field Values
MAGICNUMBER_TREE_MAP
protected static final int MAGICNUMBER_TREE_MAP
- See Also:
- Constant Field Values
MAGICNUMBER_HASH_SET
protected static final int MAGICNUMBER_HASH_SET
- See Also:
- Constant Field Values
MAGICNUMBER_TREE_SET
protected static final int MAGICNUMBER_TREE_SET
- See Also:
- Constant Field Values
MAGICNUMBER_NODEDATA_MARKER
protected static final int MAGICNUMBER_NODEDATA_MARKER
- See Also:
- Constant Field Values
MAGICNUMBER_NODEDATA_EXCEPTION_MARKER
protected static final int MAGICNUMBER_NODEDATA_EXCEPTION_MARKER
- See Also:
- Constant Field Values
MAGICNUMBER_NODEDATA
protected static final int MAGICNUMBER_NODEDATA
- See Also:
- Constant Field Values
MAGICNUMBER_GRAVITATERESULT
protected static final int MAGICNUMBER_GRAVITATERESULT
- See Also:
- Constant Field Values
MAGICNUMBER_SHORT
protected static final int MAGICNUMBER_SHORT
- See Also:
- Constant Field Values
MAGICNUMBER_MAPCOPY
protected static final int MAGICNUMBER_MAPCOPY
- See Also:
- Constant Field Values
MAGICNUMBER_MARSHALLEDVALUE
protected static final int MAGICNUMBER_MARSHALLEDVALUE
- See Also:
- Constant Field Values
MAGICNUMBER_NULL
protected static final int MAGICNUMBER_NULL
- See Also:
- Constant Field Values
MAGICNUMBER_SERIALIZABLE
protected static final int MAGICNUMBER_SERIALIZABLE
- See Also:
- Constant Field Values
MAGICNUMBER_REF
protected static final int MAGICNUMBER_REF
- See Also:
- Constant Field Values
IRE
protected static final InactiveRegionException IRE
CacheMarshaller200
public CacheMarshaller200()
objectToObjectStream
public void objectToObjectStream(Object o,
ObjectOutputStream out)
throws Exception
- Description copied from interface:
Marshaller
- Marshalls an object to a given
ObjectOutputStream
- Parameters:
o
- object to marshallout
- stream to marshall to
- Throws:
Exception
regionalizedMethodCallFromObjectStream
public org.jboss.cache.marshall.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
- Overrides:
regionalizedMethodCallFromObjectStream
in class AbstractMarshaller
- Parameters:
in
- object inout stream
- Returns:
- a RegionalizedMethodCall
- Throws:
Exception
- if there are issues
objectFromObjectStream
public Object objectFromObjectStream(ObjectInputStream in)
throws Exception
- Description copied from interface:
Marshaller
- Unmarshalls an object from an
ObjectInputStream
- Parameters:
in
- stream to unmarshall from
- Throws:
Exception
objectToObjectStream
public void objectToObjectStream(Object o,
ObjectOutputStream out,
Fqn region)
throws Exception
- Description copied from interface:
Marshaller
- Overloaded form of
Marshaller.objectToObjectStream(Object,java.io.ObjectOutputStream)
which adds a hint to the Fqn
region
- Parameters:
o
- object to marshallout
- stream to marshall toregion
- fqn that this object pertains to
- Throws:
Exception
objectFromObjectStreamRegionBased
protected Object[] objectFromObjectStreamRegionBased(ObjectInputStream in)
throws Exception
- Parameters:
in
-
- Returns:
- a 2-object array. The first one is the unmarshalled object and the 2nd is an Fqn that relates to the region used. If region-based marshalling is not used, the 2nd value is null.
- Throws:
Exception
isReplicateMethod
protected boolean isReplicateMethod(MethodCall call)
isReplicateAllMethod
protected boolean isReplicateAllMethod(MethodCall call)
marshallDefaultDataVersion
protected void marshallDefaultDataVersion(DefaultDataVersion ddv,
ObjectOutputStream out)
throws Exception
- Throws:
Exception
unmarshallDefaultDataVersion
protected DefaultDataVersion unmarshallDefaultDataVersion(ObjectInputStream in)
throws Exception
- Throws:
Exception
readReference
protected int readReference(ObjectInputStream in)
throws IOException
- Reads a reference from a given stream.
- Parameters:
in
- the stream to read from
- Returns:
- an int representing a reference in RefMap.
- Throws:
IOException
- propagated from the OIS
writeReference
protected void writeReference(ObjectOutputStream out,
int reference)
throws IOException
- Writes a reference to a given object output stream.
- Parameters:
out
- the stream to write toreference
- the reference to write
- Throws:
IOException
- propagated from the OOS
readUnsignedInt
protected int readUnsignedInt(ObjectInputStream in)
throws IOException
- Throws:
IOException
writeUnsignedInt
protected void writeUnsignedInt(ObjectOutputStream out,
int i)
throws IOException
- Throws:
IOException
readUnsignedLong
protected long readUnsignedLong(ObjectInputStream in)
throws IOException
- Throws:
IOException
writeUnsignedLong
protected void writeUnsignedLong(ObjectOutputStream out,
long i)
throws IOException
- Throws:
IOException
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.