|
||||||||||
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.VersionAwareMarshaller
public class VersionAwareMarshaller
A delegate to various other marshallers like JBossMarshaller
. 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 |
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. |
void |
stop()
|
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 |
Constructor Detail |
---|
public VersionAwareMarshaller()
Method Detail |
---|
public void init(ClassLoader loader, RemoteCommandFactory remoteCommandFactory)
public void stop()
protected int getCustomMarshallerVersionInt()
public ByteBuffer objectToBuffer(Object obj) throws IOException
Marshaller
ByteBuffer
, which allows direct access to the byte
array with minimal array copying
obj
- object to marshall
IOException
public Object objectFromByteBuffer(byte[] bytes, int offset, int len) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
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 obj, ObjectOutput out) throws IOException
Marshaller
ObjectOutput
obj
- 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 byte[] objectToByteBuffer(Object obj) throws IOException
IOException
public Object objectFromByteBuffer(byte[] buf) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |