org.infinispan.marshall
Class MarshallerImpl

java.lang.Object
  extended by org.infinispan.marshall.AbstractMarshaller
      extended by org.infinispan.marshall.MarshallerImpl
All Implemented Interfaces:
Marshaller

Deprecated. JBoss Marshaller based Marshaller is now use rather than this legacy home grown marshaller. This marshaller hasn't been removed yet so that we can can carry on comparing payload sizes between the different marshallers. This will specially help as JBoss Marshaller continues to provide more and more efficient payloads.

@Deprecated
public class MarshallerImpl
extends AbstractMarshaller

Abstract marshaller

Since:
4.0
Author:
Manik Surtani (manik@jboss.org), Galder ZamarreƱo

Field Summary
protected  ClassLoader defaultClassLoader
          Deprecated.  
protected  Log log
          Deprecated.  
protected static int MAGICNUMBER_ARRAY
          Deprecated.  
protected static int MAGICNUMBER_ARRAY_LIST
          Deprecated.  
protected static int MAGICNUMBER_BOOLEAN
          Deprecated.  
protected static int MAGICNUMBER_BYTE
          Deprecated.  
protected static int MAGICNUMBER_CACHESTORE_BUCKET
          Deprecated.  
protected static int MAGICNUMBER_CHAR
          Deprecated.  
protected static int MAGICNUMBER_COMMAND
          Deprecated.  
protected static int MAGICNUMBER_DOUBLE
          Deprecated.  
protected static int MAGICNUMBER_EXCEPTION_RESPONSE
          Deprecated.  
protected static int MAGICNUMBER_EXTENDED_RESPONSE
          Deprecated.  
protected static int MAGICNUMBER_FASTCOPY_HASHMAP
          Deprecated.  
protected static int MAGICNUMBER_FLOAT
          Deprecated.  
protected static int MAGICNUMBER_GTX
          Deprecated.  
protected static int MAGICNUMBER_HASH_MAP
          Deprecated.  
protected static int MAGICNUMBER_HASH_SET
          Deprecated.  
protected static int MAGICNUMBER_ICE_IMMORTAL
          Deprecated.  
protected static int MAGICNUMBER_ICE_MORTAL
          Deprecated.  
protected static int MAGICNUMBER_ICE_TRANSIENT
          Deprecated.  
protected static int MAGICNUMBER_ICE_TRANSIENT_MORTAL
          Deprecated.  
protected static int MAGICNUMBER_ICV_IMMORTAL
          Deprecated.  
protected static int MAGICNUMBER_ICV_MORTAL
          Deprecated.  
protected static int MAGICNUMBER_ICV_TRANSIENT
          Deprecated.  
protected static int MAGICNUMBER_ICV_TRANSIENT_MORTAL
          Deprecated.  
protected static int MAGICNUMBER_IMMUTABLE_MAPCOPY
          Deprecated.  
protected static int MAGICNUMBER_INTEGER
          Deprecated.  
protected static int MAGICNUMBER_JG_ADDRESS
          Deprecated.  
protected static int MAGICNUMBER_LINKED_LIST
          Deprecated.  
protected static int MAGICNUMBER_LONG
          Deprecated.  
protected static int MAGICNUMBER_MARSHALLEDVALUE
          Deprecated.  
protected static int MAGICNUMBER_NULL
          Deprecated.  
protected static int MAGICNUMBER_OBJECT
          Deprecated.  
protected static int MAGICNUMBER_REF
          Deprecated.  
protected static int MAGICNUMBER_REQUEST_IGNORED_RESPONSE
          Deprecated.  
protected static int MAGICNUMBER_SERIALIZABLE
          Deprecated.  
protected static int MAGICNUMBER_SHORT
          Deprecated.  
protected static int MAGICNUMBER_SINGLETON_LIST
          Deprecated.  
protected static int MAGICNUMBER_STRING
          Deprecated.  
protected static int MAGICNUMBER_SUCCESSFUL_RESPONSE
          Deprecated.  
protected static int MAGICNUMBER_TRANSACTION_LOG
          Deprecated.  
protected static int MAGICNUMBER_TREE_MAP
          Deprecated.  
protected static int MAGICNUMBER_TREE_SET
          Deprecated.  
protected static int MAGICNUMBER_UNSUCCESSFUL_RESPONSE
          Deprecated.  
protected  boolean trace
          Deprecated.  
protected  boolean useRefs
          Deprecated.  
 
Constructor Summary
MarshallerImpl()
          Deprecated.  
 
Method Summary
 void finishObjectInput(ObjectInput oi)
          Deprecated. Finish using the given ObjectInput.
 void finishObjectOutput(ObjectOutput oo)
          Deprecated. Finish using the given ObjectOutput.
 void init(ClassLoader defaultClassLoader, RemoteCommandFactory remoteCommandFactory)
          Deprecated.  
protected  void initLogger()
          Deprecated.  
protected  boolean isKnownType(Class c)
          Deprecated.  
protected  void marshallArray(Object o, ObjectOutput out, Map<Object,Integer> refMap)
          Deprecated.  
protected  void marshallObject(Object o, ObjectOutput out, Map<Object,Integer> refMap)
          Deprecated.  
protected  void marshallString(String s, ObjectOutput out)
          Deprecated.  
 Object objectFromByteBuffer(byte[] bytes)
          Deprecated.  
 Object objectFromByteBuffer(byte[] buf, int offset, int length)
          Deprecated.  
 Object objectFromObjectStream(ObjectInput in)
          Deprecated. Unmarshalls an object from an ObjectInput
 ByteBuffer objectToBuffer(Object o)
          Deprecated. A method that returns an instance of ByteBuffer, which allows direct access to the byte array with minimal array copying
 byte[] objectToByteBuffer(Object obj)
          Deprecated.  
 void objectToObjectStream(Object o, ObjectOutput out)
          Deprecated. Marshalls an object to a given ObjectOutput
protected  int readReference(ObjectInput in)
          Deprecated. This version of readReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.
 ObjectInput startObjectInput(InputStream is)
          Deprecated. Create and open a new ObjectInput for the given input stream.
 ObjectOutput startObjectOutput(OutputStream os)
          Deprecated. Create and open a new ObjectOutput for the given output stream.
protected  Object unmarshallArray(ObjectInput in, UnmarshalledReferences refs)
          Deprecated.  
protected  Object unmarshallObject(ObjectInput in, ClassLoader loader, UnmarshalledReferences refMap, boolean overrideContextClassloaderOnThread)
          Deprecated.  
protected  Object unmarshallObject(ObjectInput in, UnmarshalledReferences refMap)
          Deprecated.  
protected  String unmarshallString(ObjectInput in)
          Deprecated.  
protected  void writeReference(ObjectOutput out, int reference)
          Deprecated. This version of writeReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.
 
Methods inherited from class org.infinispan.marshall.AbstractMarshaller
objectFromInputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAGICNUMBER_GTX

protected static final int MAGICNUMBER_GTX
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_JG_ADDRESS

protected static final int MAGICNUMBER_JG_ADDRESS
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ARRAY_LIST

protected static final int MAGICNUMBER_ARRAY_LIST
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_INTEGER

protected static final int MAGICNUMBER_INTEGER
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_LONG

protected static final int MAGICNUMBER_LONG
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_BOOLEAN

protected static final int MAGICNUMBER_BOOLEAN
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_STRING

protected static final int MAGICNUMBER_STRING
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_LINKED_LIST

protected static final int MAGICNUMBER_LINKED_LIST
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_HASH_MAP

protected static final int MAGICNUMBER_HASH_MAP
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_TREE_MAP

protected static final int MAGICNUMBER_TREE_MAP
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_HASH_SET

protected static final int MAGICNUMBER_HASH_SET
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_TREE_SET

protected static final int MAGICNUMBER_TREE_SET
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_SHORT

protected static final int MAGICNUMBER_SHORT
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_IMMUTABLE_MAPCOPY

protected static final int MAGICNUMBER_IMMUTABLE_MAPCOPY
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_MARSHALLEDVALUE

protected static final int MAGICNUMBER_MARSHALLEDVALUE
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_FASTCOPY_HASHMAP

protected static final int MAGICNUMBER_FASTCOPY_HASHMAP
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ARRAY

protected static final int MAGICNUMBER_ARRAY
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_BYTE

protected static final int MAGICNUMBER_BYTE
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_CHAR

protected static final int MAGICNUMBER_CHAR
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_FLOAT

protected static final int MAGICNUMBER_FLOAT
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_DOUBLE

protected static final int MAGICNUMBER_DOUBLE
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_OBJECT

protected static final int MAGICNUMBER_OBJECT
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_SINGLETON_LIST

protected static final int MAGICNUMBER_SINGLETON_LIST
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_COMMAND

protected static final int MAGICNUMBER_COMMAND
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_TRANSACTION_LOG

protected static final int MAGICNUMBER_TRANSACTION_LOG
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ICE_IMMORTAL

protected static final int MAGICNUMBER_ICE_IMMORTAL
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ICE_MORTAL

protected static final int MAGICNUMBER_ICE_MORTAL
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ICE_TRANSIENT

protected static final int MAGICNUMBER_ICE_TRANSIENT
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ICE_TRANSIENT_MORTAL

protected static final int MAGICNUMBER_ICE_TRANSIENT_MORTAL
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ICV_IMMORTAL

protected static final int MAGICNUMBER_ICV_IMMORTAL
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ICV_MORTAL

protected static final int MAGICNUMBER_ICV_MORTAL
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ICV_TRANSIENT

protected static final int MAGICNUMBER_ICV_TRANSIENT
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_ICV_TRANSIENT_MORTAL

protected static final int MAGICNUMBER_ICV_TRANSIENT_MORTAL
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_REQUEST_IGNORED_RESPONSE

protected static final int MAGICNUMBER_REQUEST_IGNORED_RESPONSE
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_EXTENDED_RESPONSE

protected static final int MAGICNUMBER_EXTENDED_RESPONSE
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_EXCEPTION_RESPONSE

protected static final int MAGICNUMBER_EXCEPTION_RESPONSE
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_SUCCESSFUL_RESPONSE

protected static final int MAGICNUMBER_SUCCESSFUL_RESPONSE
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_UNSUCCESSFUL_RESPONSE

protected static final int MAGICNUMBER_UNSUCCESSFUL_RESPONSE
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_CACHESTORE_BUCKET

protected static final int MAGICNUMBER_CACHESTORE_BUCKET
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_NULL

protected static final int MAGICNUMBER_NULL
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_SERIALIZABLE

protected static final int MAGICNUMBER_SERIALIZABLE
Deprecated. 
See Also:
Constant Field Values

MAGICNUMBER_REF

protected static final int MAGICNUMBER_REF
Deprecated. 
See Also:
Constant Field Values

log

protected Log log
Deprecated. 

trace

protected boolean trace
Deprecated. 

defaultClassLoader

protected ClassLoader defaultClassLoader
Deprecated. 

useRefs

protected boolean useRefs
Deprecated. 
Constructor Detail

MarshallerImpl

public MarshallerImpl()
Deprecated. 
Method Detail

init

public void init(ClassLoader defaultClassLoader,
                 RemoteCommandFactory remoteCommandFactory)
Deprecated. 

initLogger

protected void initLogger()
Deprecated. 

objectToByteBuffer

public byte[] objectToByteBuffer(Object obj)
                          throws IOException
Deprecated. 
Throws:
IOException

marshallObject

protected void marshallObject(Object o,
                              ObjectOutput out,
                              Map<Object,Integer> refMap)
                       throws IOException
Deprecated. 
Throws:
IOException

marshallString

protected void marshallString(String s,
                              ObjectOutput out)
                       throws IOException
Deprecated. 
Throws:
IOException

unmarshallObject

protected Object unmarshallObject(ObjectInput in,
                                  ClassLoader loader,
                                  UnmarshalledReferences refMap,
                                  boolean overrideContextClassloaderOnThread)
                           throws IOException,
                                  ClassNotFoundException
Deprecated. 
Throws:
IOException
ClassNotFoundException

unmarshallObject

protected Object unmarshallObject(ObjectInput in,
                                  UnmarshalledReferences refMap)
                           throws IOException,
                                  ClassNotFoundException
Deprecated. 
Throws:
IOException
ClassNotFoundException

unmarshallString

protected String unmarshallString(ObjectInput in)
                           throws IOException,
                                  ClassNotFoundException
Deprecated. 
Throws:
IOException
ClassNotFoundException

writeReference

protected void writeReference(ObjectOutput out,
                              int reference)
                       throws IOException
Deprecated. 
This version of writeReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.

Parameters:
out - stream to write to
reference - reference to write
Throws:
IOException - propagated from OOS
See Also:
JBCACHE-1211

readReference

protected int readReference(ObjectInput in)
                     throws IOException
Deprecated. 
This version of readReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.

Parameters:
in - stream to read from
Returns:
reference
Throws:
IOException - propagated from OUS
See Also:
JBCACHE-1211

unmarshallArray

protected Object unmarshallArray(ObjectInput in,
                                 UnmarshalledReferences refs)
                          throws IOException,
                                 ClassNotFoundException
Deprecated. 
Throws:
IOException
ClassNotFoundException

marshallArray

protected void marshallArray(Object o,
                             ObjectOutput out,
                             Map<Object,Integer> refMap)
                      throws IOException
Deprecated. 
Throws:
IOException

isKnownType

protected boolean isKnownType(Class c)
Deprecated. 

startObjectOutput

public ObjectOutput startObjectOutput(OutputStream os)
                               throws IOException
Deprecated. 
Description copied from interface: Marshaller
Create and open a new ObjectOutput for the given output stream. This method should be used for opening data outpus when multiple objectToObjectStream() calls will be made before the stream is closed

Parameters:
os - output stream
Returns:
ObjectOutput to write to
Throws:
IOException

finishObjectOutput

public void finishObjectOutput(ObjectOutput oo)
Deprecated. 
Description copied from interface: Marshaller
Finish using the given ObjectOutput. After opening a ObjectOutput and calling objectToObjectStream() mutliple times, use this method to flush the data and close if necessary

Parameters:
oo - data output that finished using

objectToObjectStream

public void objectToObjectStream(Object o,
                                 ObjectOutput out)
                          throws IOException
Deprecated. 
Description copied from interface: Marshaller
Marshalls an object to a given ObjectOutput

Parameters:
o - object to marshall
out - stream to marshall to
Throws:
IOException

startObjectInput

public ObjectInput startObjectInput(InputStream is)
                             throws IOException
Deprecated. 
Description copied from interface: Marshaller
Create and open a new ObjectInput for the given input stream. This method should be used for opening data inputs when multiple objectFromObjectStream() calls will be made before the stream is closed.

Parameters:
is - input stream
Returns:
ObjectInput to read from
Throws:
IOException

finishObjectInput

public void finishObjectInput(ObjectInput oi)
Deprecated. 
Description copied from interface: Marshaller
Finish using the given ObjectInput. After opening a ObjectInput and calling objectFromObjectStream() mutliple times, use this method to flush the data and close if necessary

Parameters:
oi - data input that finished using

objectFromObjectStream

public Object objectFromObjectStream(ObjectInput in)
                              throws IOException,
                                     ClassNotFoundException
Deprecated. 
Description copied from interface: Marshaller
Unmarshalls an object from an ObjectInput

Parameters:
in - stream to unmarshall from
Throws:
IOException
ClassNotFoundException

objectToBuffer

public ByteBuffer objectToBuffer(Object o)
                          throws IOException
Deprecated. 
Description copied from interface: Marshaller
A method that returns an instance of ByteBuffer, which allows direct access to the byte array with minimal array copying

Parameters:
o - object to marshall
Returns:
a ByteBuffer
Throws:
IOException

objectFromByteBuffer

public Object objectFromByteBuffer(byte[] buf,
                                   int offset,
                                   int length)
                            throws IOException,
                                   ClassNotFoundException
Deprecated. 
Throws:
IOException
ClassNotFoundException

objectFromByteBuffer

public Object objectFromByteBuffer(byte[] bytes)
                            throws IOException,
                                   ClassNotFoundException
Deprecated. 
Throws:
IOException
ClassNotFoundException


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.