|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.marshall.AbstractMarshaller
org.jboss.cache.marshall.VersionAwareMarshaller
public class VersionAwareMarshaller
A delegate to various other marshallers like CacheMarshaller200.
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.
| Field Summary |
|---|
| Fields inherited from class org.jboss.cache.marshall.AbstractMarshaller |
|---|
configuration, defaultClassLoader, defaultInactive, regionManager, trace, useRefs, useRegionBasedMarshalling |
| Constructor Summary | |
|---|---|
VersionAwareMarshaller()
|
|
| Method Summary | |
|---|---|
protected int |
getCustomMarshallerVersionInt()
|
void |
initReplicationVersions()
|
Object |
objectFromByteBuffer(byte[] buf)
|
Object |
objectFromObjectStream(ObjectInputStream in)
Unmarshalls an object from an ObjectInputStream |
Object |
objectFromStream(InputStream is)
Unmarshalls an object from an InputStream |
byte[] |
objectToByteBuffer(Object obj,
boolean writeHeader)
Same as RpcDispatcher.Marshaller.objectToByteBuffer(Object) except that you can optionally specify to write object stream headers. |
void |
objectToObjectStream(Object obj,
ObjectOutputStream out)
Marshalls an object to a given ObjectOutputStream |
void |
objectToObjectStream(Object obj,
ObjectOutputStream out,
Fqn region)
Overloaded form of Marshaller.objectToObjectStream(Object,java.io.ObjectOutputStream) which adds a hint to the Fqn region |
org.jboss.cache.marshall.RegionalizedMethodCall |
regionalizedMethodCallFromByteBuffer(byte[] buf)
Returns a RegionalizedMethodCall from a byte buffer. |
| Methods inherited from class org.jboss.cache.marshall.AbstractMarshaller |
|---|
extractFqn, extractFqnFromListOfMethodCall, extractFqnFromMethodCall, getRegion, init, initLogger, objectToByteBuffer, regionalizedMethodCallFromObjectStream |
| 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 initReplicationVersions()
protected int getCustomMarshallerVersionInt()
public byte[] objectToByteBuffer(Object obj,
boolean writeHeader)
throws Exception
MarshallerRpcDispatcher.Marshaller.objectToByteBuffer(Object) except that you can optionally specify to write object stream headers.
Useful if you intend to deserialize the stream with non-pooled input streams.
objectToByteBuffer in interface MarshallerobjectToByteBuffer in class AbstractMarshallerException
public Object objectFromByteBuffer(byte[] buf)
throws Exception
objectFromByteBuffer in interface org.jgroups.blocks.RpcDispatcher.MarshallerobjectFromByteBuffer in class AbstractMarshallerException
public org.jboss.cache.marshall.RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buf)
throws Exception
MarshallerRpcDispatcher.Marshaller.objectFromByteBuffer(byte[])
regionalizedMethodCallFromByteBuffer in interface MarshallerregionalizedMethodCallFromByteBuffer in class AbstractMarshallerbuf - byte buffer
Exception - if there are issues
public Object objectFromStream(InputStream is)
throws Exception
MarshallerInputStream
objectFromStream in interface MarshallerobjectFromStream in class AbstractMarshalleris - stream to unmarshall from
Exception
public void objectToObjectStream(Object obj,
ObjectOutputStream out,
Fqn region)
throws Exception
MarshallerMarshaller.objectToObjectStream(Object,java.io.ObjectOutputStream) which adds a hint to the Fqn region
obj - object to marshallout - stream to marshall toregion - fqn that this object pertains to
Exception
public void objectToObjectStream(Object obj,
ObjectOutputStream out)
throws Exception
MarshallerObjectOutputStream
obj - object to marshallout - stream to marshall to
Exception
public Object objectFromObjectStream(ObjectInputStream in)
throws Exception
MarshallerObjectInputStream
in - stream to unmarshall from
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||