public class VersionAwareMarshaller
extends org.infinispan.commons.marshall.AbstractMarshaller
implements org.infinispan.commons.marshall.StreamingMarshaller
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 and Description |
---|
VersionAwareMarshaller() |
Modifier and Type | Method and Description |
---|---|
void |
finishObjectInput(ObjectInput oi) |
void |
finishObjectOutput(ObjectOutput oo) |
String |
getCacheName() |
void |
inject(Cache cache,
Configuration cfg,
InvocationContextContainer icc,
ExternalizerTable extTable,
GlobalConfiguration globalCfg) |
boolean |
isMarshallable(Object o) |
Object |
objectFromByteBuffer(byte[] bytes,
int offset,
int len) |
Object |
objectFromObjectStream(ObjectInput in) |
protected org.infinispan.commons.io.ByteBuffer |
objectToBuffer(Object obj,
int estimatedSize) |
void |
objectToObjectStream(Object obj,
ObjectOutput out) |
void |
start() |
ObjectInput |
startObjectInput(InputStream is,
boolean isReentrant) |
ObjectOutput |
startObjectOutput(OutputStream os,
boolean isReentrant,
int estimatedSize) |
void |
stop() |
getBufferSizePredictor, objectFromByteBuffer, objectFromInputStream, objectToBuffer, objectToByteBuffer, objectToByteBuffer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void inject(Cache cache, Configuration cfg, InvocationContextContainer icc, ExternalizerTable extTable, GlobalConfiguration globalCfg)
public void start()
start
in interface org.infinispan.commons.marshall.StreamingMarshaller
public void stop()
stop
in interface org.infinispan.commons.marshall.StreamingMarshaller
protected org.infinispan.commons.io.ByteBuffer objectToBuffer(Object obj, int estimatedSize) throws IOException, InterruptedException
objectToBuffer
in class org.infinispan.commons.marshall.AbstractMarshaller
IOException
InterruptedException
public Object objectFromByteBuffer(byte[] bytes, int offset, int len) throws IOException, ClassNotFoundException
objectFromByteBuffer
in interface org.infinispan.commons.marshall.Marshaller
IOException
ClassNotFoundException
public ObjectOutput startObjectOutput(OutputStream os, boolean isReentrant, int estimatedSize) throws IOException
startObjectOutput
in interface org.infinispan.commons.marshall.StreamingMarshaller
IOException
public void finishObjectOutput(ObjectOutput oo)
finishObjectOutput
in interface org.infinispan.commons.marshall.StreamingMarshaller
public void objectToObjectStream(Object obj, ObjectOutput out) throws IOException
objectToObjectStream
in interface org.infinispan.commons.marshall.StreamingMarshaller
IOException
public ObjectInput startObjectInput(InputStream is, boolean isReentrant) throws IOException
startObjectInput
in interface org.infinispan.commons.marshall.StreamingMarshaller
IOException
public void finishObjectInput(ObjectInput oi)
finishObjectInput
in interface org.infinispan.commons.marshall.StreamingMarshaller
public Object objectFromObjectStream(ObjectInput in) throws IOException, ClassNotFoundException, InterruptedException
objectFromObjectStream
in interface org.infinispan.commons.marshall.StreamingMarshaller
IOException
ClassNotFoundException
InterruptedException
public boolean isMarshallable(Object o) throws Exception
isMarshallable
in interface org.infinispan.commons.marshall.Marshaller
Exception
public String getCacheName()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.