|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.marshall.VersionAwareMarshaller
public class VersionAwareMarshaller
A delegate to various other marshallers like MarshallerImpl. This delegating marshaller adds versioning
information to the stream when marshalling objects and is able to pick the appropriate marshaller to delegate to
based on the versioning information when unmarshalling objects.
| Constructor Summary | |
|---|---|
VersionAwareMarshaller()
|
|
| Method Summary | |
|---|---|
void |
finishObjectInput(ObjectInput oi)
Finish using the given ObjectInput. |
void |
finishObjectOutput(ObjectOutput oo)
Finish using the given ObjectOutput. |
protected int |
getCustomMarshallerVersionInt()
|
void |
init(ClassLoader loader,
RemoteCommandFactory remoteCommandFactory)
|
Object |
objectFromByteBuffer(byte[] buf)
|
Object |
objectFromByteBuffer(byte[] bytes,
int offset,
int len)
|
Object |
objectFromObjectStream(ObjectInput in)
Unmarshalls an object from an ObjectInput |
Object |
objectFromStream(InputStream is)
Unmarshalls an object from an InputStream |
ByteBuffer |
objectToBuffer(Object obj)
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 obj,
ObjectOutput out)
Marshalls an object to a given ObjectOutput |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VersionAwareMarshaller()
| Method Detail |
|---|
public void init(ClassLoader loader,
RemoteCommandFactory remoteCommandFactory)
protected int getCustomMarshallerVersionInt()
public ByteBuffer objectToBuffer(Object obj)
throws IOException
MarshallerByteBuffer, which allows direct access to the byte
array with minimal array copying
objectToBuffer in interface Marshallerobj - object to marshall
IOException
public Object objectFromByteBuffer(byte[] bytes,
int offset,
int len)
throws IOException,
ClassNotFoundException
objectFromByteBuffer in interface MarshallerIOException
ClassNotFoundException
public Object objectFromStream(InputStream is)
throws IOException,
ClassNotFoundException
MarshallerInputStream
objectFromStream in interface Marshalleris - stream to unmarshall from
IOException
ClassNotFoundException
public ObjectOutput startObjectOutput(OutputStream os)
throws IOException
Marshaller
startObjectOutput in interface Marshalleros - output stream
IOExceptionpublic void finishObjectOutput(ObjectOutput oo)
Marshaller
finishObjectOutput in interface Marshalleroo - data output that finished using
public void objectToObjectStream(Object obj,
ObjectOutput out)
throws IOException
MarshallerObjectOutput
objectToObjectStream in interface Marshallerobj - object to marshallout - stream to marshall to
IOException
public ObjectInput startObjectInput(InputStream is)
throws IOException
Marshaller
startObjectInput in interface Marshalleris - input stream
IOExceptionpublic void finishObjectInput(ObjectInput oi)
Marshaller
finishObjectInput in interface Marshalleroi - data input that finished using
public Object objectFromObjectStream(ObjectInput in)
throws IOException,
ClassNotFoundException
MarshallerObjectInput
objectFromObjectStream in interface Marshallerin - stream to unmarshall from
IOException
ClassNotFoundException
public byte[] objectToByteBuffer(Object obj)
throws IOException
objectToByteBuffer in interface MarshallerIOException
public Object objectFromByteBuffer(byte[] buf)
throws IOException,
ClassNotFoundException
objectFromByteBuffer in interface MarshallerIOException
ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||