|
||||||||||
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
Marshaller
ByteBuffer
, which allows direct access to the byte
array with minimal array copying
objectToBuffer
in interface Marshaller
obj
- object to marshall
IOException
public Object objectFromByteBuffer(byte[] bytes, int offset, int len) throws IOException, ClassNotFoundException
objectFromByteBuffer
in interface Marshaller
IOException
ClassNotFoundException
public Object objectFromStream(InputStream is) throws IOException, ClassNotFoundException
Marshaller
InputStream
objectFromStream
in interface Marshaller
is
- stream to unmarshall from
IOException
ClassNotFoundException
public ObjectOutput startObjectOutput(OutputStream os) throws IOException
Marshaller
startObjectOutput
in interface Marshaller
os
- output stream
IOException
public void finishObjectOutput(ObjectOutput oo)
Marshaller
finishObjectOutput
in interface Marshaller
oo
- data output that finished usingpublic void objectToObjectStream(Object obj, ObjectOutput out) throws IOException
Marshaller
ObjectOutput
objectToObjectStream
in interface Marshaller
obj
- object to marshallout
- stream to marshall to
IOException
public ObjectInput startObjectInput(InputStream is) throws IOException
Marshaller
startObjectInput
in interface Marshaller
is
- input stream
IOException
public void finishObjectInput(ObjectInput oi)
Marshaller
finishObjectInput
in interface Marshaller
oi
- data input that finished usingpublic Object objectFromObjectStream(ObjectInput in) throws IOException, ClassNotFoundException
Marshaller
ObjectInput
objectFromObjectStream
in interface Marshaller
in
- stream to unmarshall from
IOException
ClassNotFoundException
public byte[] objectToByteBuffer(Object obj) throws IOException
objectToByteBuffer
in interface Marshaller
IOException
public Object objectFromByteBuffer(byte[] buf) throws IOException, ClassNotFoundException
objectFromByteBuffer
in interface Marshaller
IOException
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |