Class JBossMarshaller

  • All Implemented Interfaces:
    org.infinispan.commons.marshall.Marshaller, org.infinispan.commons.marshall.StreamingMarshaller

    public class JBossMarshaller
    extends org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller
    implements org.infinispan.commons.marshall.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.

    Since:
    4.0
    Author:
    Galder ZamarreƱo, Sanne Grinovero
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller

        org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.DebuggingExceptionListener
    • Field Summary

      • Fields inherited from class org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller

        baseCfg, DEF_CLASS_COUNT, DEF_INSTANCE_COUNT, factory, log
      • Fields inherited from class org.infinispan.commons.marshall.AbstractMarshaller

        marshallableTypeHints
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isMarshallableCandidate​(Object o)  
      void start()  
      void stop()
      Stop the marshaller.
      • Methods inherited from class org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller

        finishObjectInput, finishObjectOutput, isMarshallable, mediaType, objectFromByteBuffer, objectFromObjectStream, objectToBuffer, objectToObjectStream, startObjectInput, startObjectOutput
      • Methods inherited from class org.infinispan.commons.marshall.AbstractMarshaller

        getBufferSizePredictor, objectFromByteBuffer, objectFromInputStream, objectToBuffer, objectToByteBuffer, objectToByteBuffer
      • Methods inherited from interface org.infinispan.commons.marshall.Marshaller

        getBufferSizePredictor, isMarshallable, mediaType, objectFromByteBuffer, objectFromByteBuffer, objectToBuffer, objectToByteBuffer, objectToByteBuffer
      • Methods inherited from interface org.infinispan.commons.marshall.StreamingMarshaller

        finishObjectInput, finishObjectOutput, objectFromInputStream, objectFromObjectStream, objectToObjectStream, startObjectInput, startObjectOutput
    • Method Detail

      • start

        public void start()
        Specified by:
        start in interface org.infinispan.commons.marshall.StreamingMarshaller
        Overrides:
        start in class org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller
      • stop

        public void stop()
        Description copied from interface: org.infinispan.commons.marshall.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 org.infinispan.commons.marshall.StreamingMarshaller
        Overrides:
        stop in class org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller
      • isMarshallableCandidate

        public boolean isMarshallableCandidate​(Object o)
        Overrides:
        isMarshallableCandidate in class org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller