Class DelegatingUserMarshaller

java.lang.Object
org.infinispan.marshall.core.impl.DelegatingUserMarshaller
All Implemented Interfaces:
org.infinispan.commons.marshall.Marshaller

public class DelegatingUserMarshaller extends Object implements org.infinispan.commons.marshall.Marshaller
A delegate Marshaller implementation for the user marshaller that ensures that the Marshaller.start() and Marshaller.stop() of the configured marshaller are called and logged as required.
Since:
12.0
Author:
Ryan Emerson
  • Constructor Details

    • DelegatingUserMarshaller

      public DelegatingUserMarshaller(org.infinispan.commons.marshall.Marshaller marshaller)
  • Method Details

    • start

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

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

      public void initialize(org.infinispan.commons.configuration.ClassAllowList classAllowList)
      Specified by:
      initialize in interface org.infinispan.commons.marshall.Marshaller
    • objectToByteBuffer

      public byte[] objectToByteBuffer(Object obj, int estimatedSize) throws IOException, InterruptedException
      Specified by:
      objectToByteBuffer in interface org.infinispan.commons.marshall.Marshaller
      Throws:
      IOException
      InterruptedException
    • objectToByteBuffer

      public byte[] objectToByteBuffer(Object obj) throws IOException, InterruptedException
      Specified by:
      objectToByteBuffer in interface org.infinispan.commons.marshall.Marshaller
      Throws:
      IOException
      InterruptedException
    • objectFromByteBuffer

      public Object objectFromByteBuffer(byte[] buf) throws IOException, ClassNotFoundException
      Specified by:
      objectFromByteBuffer in interface org.infinispan.commons.marshall.Marshaller
      Throws:
      IOException
      ClassNotFoundException
    • objectFromByteBuffer

      public Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, ClassNotFoundException
      Specified by:
      objectFromByteBuffer in interface org.infinispan.commons.marshall.Marshaller
      Throws:
      IOException
      ClassNotFoundException
    • objectToBuffer

      public org.infinispan.commons.io.ByteBuffer objectToBuffer(Object o) throws IOException, InterruptedException
      Specified by:
      objectToBuffer in interface org.infinispan.commons.marshall.Marshaller
      Throws:
      IOException
      InterruptedException
    • 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
    • getDelegate

      public org.infinispan.commons.marshall.Marshaller getDelegate()