Class GlobalMarshaller

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

    public class GlobalMarshaller
    extends Object
    implements org.infinispan.commons.marshall.StreamingMarshaller
    A globally-scoped marshaller. This is needed so that the transport layer can unmarshall requests even before it's known which cache's marshaller can do the job.
    Since:
    5.0
    Author:
    Galder ZamarreƱo
    • Constructor Detail

      • GlobalMarshaller

        public GlobalMarshaller()
      • GlobalMarshaller

        public GlobalMarshaller​(org.infinispan.commons.marshall.Marshaller external)
    • Method Detail

      • start

        public void start()
        Specified by:
        start in interface org.infinispan.commons.marshall.StreamingMarshaller
      • startDefaultExternalMarshaller

        public org.infinispan.commons.marshall.Marshaller startDefaultExternalMarshaller​(GlobalConfiguration globalCfg)
      • stop

        public void stop()
        Specified by:
        stop in interface org.infinispan.commons.marshall.StreamingMarshaller
      • stopDefaultExternalMarshaller

        public void stopDefaultExternalMarshaller()
      • startObjectOutput

        public ObjectOutput startObjectOutput​(OutputStream os,
                                              boolean isReentrant,
                                              int estimatedSize)
                                       throws IOException
        Specified by:
        startObjectOutput in interface org.infinispan.commons.marshall.StreamingMarshaller
        Throws:
        IOException
      • objectToObjectStream

        public void objectToObjectStream​(Object obj,
                                         ObjectOutput out)
                                  throws IOException
        Specified by:
        objectToObjectStream in interface org.infinispan.commons.marshall.StreamingMarshaller
        Throws:
        IOException
      • finishObjectOutput

        public void finishObjectOutput​(ObjectOutput oo)
        Specified by:
        finishObjectOutput in interface org.infinispan.commons.marshall.StreamingMarshaller
      • isMarshallable

        public boolean isMarshallable​(Object o)
                               throws Exception
        Specified by:
        isMarshallable in interface org.infinispan.commons.marshall.Marshaller
        Throws:
        Exception
      • getBufferSizePredictor

        public org.infinispan.commons.marshall.BufferSizePredictor getBufferSizePredictor​(Object o)
        Specified by:
        getBufferSizePredictor in interface org.infinispan.commons.marshall.Marshaller
      • mediaType

        public org.infinispan.commons.dataconversion.MediaType mediaType()
        Specified by:
        mediaType in interface org.infinispan.commons.marshall.Marshaller
      • startObjectInput

        public ObjectInput startObjectInput​(InputStream is,
                                            boolean isReentrant)
        Specified by:
        startObjectInput in interface org.infinispan.commons.marshall.StreamingMarshaller
      • finishObjectInput

        public void finishObjectInput​(ObjectInput oi)
        Specified by:
        finishObjectInput in interface org.infinispan.commons.marshall.StreamingMarshaller
      • objectFromObjectStream

        public Object objectFromObjectStream​(ObjectInput in)
        Specified by:
        objectFromObjectStream in interface org.infinispan.commons.marshall.StreamingMarshaller
      • findExternalizerFor

        public <T> org.infinispan.commons.marshall.Externalizer<T> findExternalizerFor​(Object obj)