|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.marshall.AbstractMarshaller
org.infinispan.marshall.MarshallerImpl
public class MarshallerImpl
Abstract marshaller
Constructor Summary | |
---|---|
MarshallerImpl()
|
Method Summary | |
---|---|
void |
finishObjectInput(ObjectInput oi)
Finish using the given ObjectInput. |
void |
finishObjectOutput(ObjectOutput oo)
Finish using the given ObjectOutput. |
void |
init(ClassLoader defaultClassLoader,
RemoteCommandFactory remoteCommandFactory)
|
protected void |
initLogger()
|
protected boolean |
isKnownType(Class c)
|
protected void |
marshallArray(Object o,
ObjectOutput out,
Map<Object,Integer> refMap)
|
protected void |
marshallObject(Object o,
ObjectOutput out,
Map<Object,Integer> refMap)
|
protected void |
marshallString(String s,
ObjectOutput out)
|
Object |
objectFromByteBuffer(byte[] bytes)
|
Object |
objectFromByteBuffer(byte[] buf,
int offset,
int length)
|
Object |
objectFromObjectStream(ObjectInput in)
Unmarshalls an object from an ObjectInput |
ByteBuffer |
objectToBuffer(Object o)
A method that returns an instance of ByteBuffer , which allows direct access to the byte
array with minimal array copying |
byte[] |
objectToByteBuffer(Object obj)
|
void |
objectToObjectStream(Object o,
ObjectOutput out)
Marshalls an object to a given ObjectOutput |
protected int |
readReference(ObjectInput in)
This version of readReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts. |
ObjectInput |
startObjectInput(InputStream is)
Create and open a new ObjectInput for the given input stream. |
ObjectOutput |
startObjectOutput(OutputStream os)
Create and open a new ObjectOutput for the given output stream. |
protected Object |
unmarshallArray(ObjectInput in,
UnmarshalledReferences refs)
|
protected Object |
unmarshallObject(ObjectInput in,
ClassLoader loader,
UnmarshalledReferences refMap,
boolean overrideContextClassloaderOnThread)
|
protected Object |
unmarshallObject(ObjectInput in,
UnmarshalledReferences refMap)
|
protected String |
unmarshallString(ObjectInput in)
|
protected void |
writeReference(ObjectOutput out,
int reference)
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 |
---|
protected static final int MAGICNUMBER_GTX
protected static final int MAGICNUMBER_JG_ADDRESS
protected static final int MAGICNUMBER_ARRAY_LIST
protected static final int MAGICNUMBER_INTEGER
protected static final int MAGICNUMBER_LONG
protected static final int MAGICNUMBER_BOOLEAN
protected static final int MAGICNUMBER_STRING
protected static final int MAGICNUMBER_LINKED_LIST
protected static final int MAGICNUMBER_HASH_MAP
protected static final int MAGICNUMBER_TREE_MAP
protected static final int MAGICNUMBER_HASH_SET
protected static final int MAGICNUMBER_TREE_SET
protected static final int MAGICNUMBER_SHORT
protected static final int MAGICNUMBER_IMMUTABLE_MAPCOPY
protected static final int MAGICNUMBER_MARSHALLEDVALUE
protected static final int MAGICNUMBER_FASTCOPY_HASHMAP
protected static final int MAGICNUMBER_ARRAY
protected static final int MAGICNUMBER_BYTE
protected static final int MAGICNUMBER_CHAR
protected static final int MAGICNUMBER_FLOAT
protected static final int MAGICNUMBER_DOUBLE
protected static final int MAGICNUMBER_OBJECT
protected static final int MAGICNUMBER_SINGLETON_LIST
protected static final int MAGICNUMBER_COMMAND
protected static final int MAGICNUMBER_TRANSACTION_LOG
protected static final int MAGICNUMBER_ICE_IMMORTAL
protected static final int MAGICNUMBER_ICE_MORTAL
protected static final int MAGICNUMBER_ICE_TRANSIENT
protected static final int MAGICNUMBER_ICE_TRANSIENT_MORTAL
protected static final int MAGICNUMBER_ICV_IMMORTAL
protected static final int MAGICNUMBER_ICV_MORTAL
protected static final int MAGICNUMBER_ICV_TRANSIENT
protected static final int MAGICNUMBER_ICV_TRANSIENT_MORTAL
protected static final int MAGICNUMBER_REQUEST_IGNORED_RESPONSE
protected static final int MAGICNUMBER_EXTENDED_RESPONSE
protected static final int MAGICNUMBER_EXCEPTION_RESPONSE
protected static final int MAGICNUMBER_SUCCESSFUL_RESPONSE
protected static final int MAGICNUMBER_UNSUCCESSFUL_RESPONSE
protected static final int MAGICNUMBER_CACHESTORE_BUCKET
protected static final int MAGICNUMBER_NULL
protected static final int MAGICNUMBER_SERIALIZABLE
protected static final int MAGICNUMBER_REF
protected Log log
protected boolean trace
protected ClassLoader defaultClassLoader
protected boolean useRefs
Constructor Detail |
---|
public MarshallerImpl()
Method Detail |
---|
public void init(ClassLoader defaultClassLoader, RemoteCommandFactory remoteCommandFactory)
protected void initLogger()
public byte[] objectToByteBuffer(Object obj) throws IOException
IOException
protected void marshallObject(Object o, ObjectOutput out, Map<Object,Integer> refMap) throws IOException
IOException
protected void marshallString(String s, ObjectOutput out) throws IOException
IOException
protected Object unmarshallObject(ObjectInput in, ClassLoader loader, UnmarshalledReferences refMap, boolean overrideContextClassloaderOnThread) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
protected Object unmarshallObject(ObjectInput in, UnmarshalledReferences refMap) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
protected String unmarshallString(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
protected void writeReference(ObjectOutput out, int reference) throws IOException
out
- stream to write toreference
- reference to write
IOException
- propagated from OOSprotected int readReference(ObjectInput in) throws IOException
in
- stream to read from
IOException
- propagated from OUSprotected Object unmarshallArray(ObjectInput in, UnmarshalledReferences refs) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
protected void marshallArray(Object o, ObjectOutput out, Map<Object,Integer> refMap) throws IOException
IOException
protected boolean isKnownType(Class c)
public ObjectOutput startObjectOutput(OutputStream os) throws IOException
Marshaller
os
- output stream
IOException
public void finishObjectOutput(ObjectOutput oo)
Marshaller
oo
- data output that finished usingpublic void objectToObjectStream(Object o, ObjectOutput out) throws IOException
Marshaller
ObjectOutput
o
- object to marshallout
- stream to marshall to
IOException
public ObjectInput startObjectInput(InputStream is) throws IOException
Marshaller
is
- input stream
IOException
public void finishObjectInput(ObjectInput oi)
Marshaller
oi
- data input that finished usingpublic Object objectFromObjectStream(ObjectInput in) throws IOException, ClassNotFoundException
Marshaller
ObjectInput
in
- stream to unmarshall from
IOException
ClassNotFoundException
public ByteBuffer objectToBuffer(Object o) throws IOException
Marshaller
ByteBuffer
, which allows direct access to the byte
array with minimal array copying
o
- object to marshall
IOException
public Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object objectFromByteBuffer(byte[] bytes) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |