Class JBossMarshaller

  extended by org.infinispan.marshall.AbstractMarshaller
      extended by org.infinispan.marshall.jboss.AbstractJBossMarshaller
          extended by org.infinispan.marshall.jboss.JBossMarshaller
All Implemented Interfaces:
Marshaller, StreamingMarshaller

public final class JBossMarshaller
extends AbstractJBossMarshaller
implements StreamingMarshaller

A JBoss Marshalling based marshaller that is oriented at internal, embedded, Infinispan usage. It uses of a custom object table for Infinispan based Externalizer instances that are either internal or user defined.

The reason why this is implemented specially in Infinispan rather than resorting to Java serialization or even the more efficient JBoss serialization is that a lot of efficiency can be gained when a majority of the serialization that occurs has to do with a small set of known types such as GlobalTransaction or ReplicableCommand, and class type information can be replaced with simple magic numbers.

Unknown types (typically user data) falls back to Java serialization.

Galder ZamarreƱo, Sanne Grinovero

Nested Class Summary
static class JBossMarshaller.EmbeddedContextClassResolver
          An embedded context class resolver that is able to retrieve a class loader from the embedded Infinispan call context.
Nested classes/interfaces inherited from class org.infinispan.marshall.jboss.AbstractJBossMarshaller
Field Summary
Fields inherited from class org.infinispan.marshall.jboss.AbstractJBossMarshaller
baseCfg, DEF_CLASS_COUNT, DEF_INSTANCE_COUNT, factory, log, trace
Fields inherited from class org.infinispan.marshall.AbstractMarshaller
Constructor Summary
Method Summary
 void inject(ExternalizerTable externalizerTable, ClassLoader cl, InvocationContextContainer icc, GlobalConfiguration globalCfg)
 boolean isMarshallableCandidate(Object o)
 void stop()
          Stop the marshaller.
Methods inherited from class org.infinispan.marshall.jboss.AbstractJBossMarshaller
finishObjectInput, finishObjectOutput, isMarshallable, objectFromByteBuffer, objectFromObjectStream, objectToBuffer, objectToObjectStream, startObjectInput, startObjectOutput, startObjectOutput
Methods inherited from class org.infinispan.marshall.AbstractMarshaller
getBufferSizePredictor, objectFromByteBuffer, objectFromInputStream, objectToBuffer, objectToByteBuffer, objectToByteBuffer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.marshall.StreamingMarshaller
finishObjectInput, finishObjectOutput, objectFromInputStream, objectFromObjectStream, objectToObjectStream, startObjectInput, startObjectOutput, startObjectOutput
Methods inherited from interface org.infinispan.marshall.Marshaller
getBufferSizePredictor, isMarshallable, objectFromByteBuffer, objectFromByteBuffer, objectToBuffer, objectToByteBuffer, objectToByteBuffer

Constructor Detail


public JBossMarshaller()
Method Detail


public void inject(ExternalizerTable externalizerTable,
                   ClassLoader cl,
                   InvocationContextContainer icc,
                   GlobalConfiguration globalCfg)


public void stop()
Description copied from interface: StreamingMarshaller
Stop the marshaller. Implementations of this method should clear up any cached data, or close any resources while marshalling/unmarshalling that have not been already closed.

Specified by:
stop in interface StreamingMarshaller
stop in class AbstractJBossMarshaller


public boolean isMarshallableCandidate(Object o)
isMarshallableCandidate in class AbstractJBossMarshaller


Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.