Class AbstractInternalProtoStreamMarshaller

java.lang.Object
org.infinispan.marshall.protostream.impl.AbstractInternalProtoStreamMarshaller
All Implemented Interfaces:
org.infinispan.commons.marshall.Marshaller, org.infinispan.commons.marshall.StreamAwareMarshaller
Direct Known Subclasses:
PersistenceMarshallerImpl

public abstract class AbstractInternalProtoStreamMarshaller extends Object implements org.infinispan.commons.marshall.Marshaller, org.infinispan.commons.marshall.StreamAwareMarshaller
An abstract ProtoStream based Marshaller and StreamAwareMarshaller implementation that is the basis of the Persistence and Global marshallers.
Since:
12.0
Author:
Ryan Emerson
  • Field Details

    • ctxRegistry

      protected SerializationContextRegistry ctxRegistry
    • userMarshaller

      protected org.infinispan.commons.marshall.Marshaller userMarshaller
    • log

      protected Log log
  • Constructor Details

    • AbstractInternalProtoStreamMarshaller

      protected AbstractInternalProtoStreamMarshaller(Log log)
  • Method Details

    • getSerializationContext

      public abstract org.infinispan.protostream.ImmutableSerializationContext getSerializationContext()
    • start

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

      public org.infinispan.commons.marshall.Marshaller getUserMarshaller()
    • objectToBuffer

      public org.infinispan.commons.io.ByteBuffer objectToBuffer(Object o)
      Specified by:
      objectToBuffer in interface org.infinispan.commons.marshall.Marshaller
    • objectToByteBuffer

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

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

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

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

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

      public void writeObject(Object o, OutputStream out) throws IOException
      Specified by:
      writeObject in interface org.infinispan.commons.marshall.StreamAwareMarshaller
      Throws:
      IOException
    • readObject

      public Object readObject(InputStream in) throws ClassNotFoundException, IOException
      Specified by:
      readObject in interface org.infinispan.commons.marshall.StreamAwareMarshaller
      Throws:
      ClassNotFoundException
      IOException
    • unwrapAndInit

      protected Object unwrapAndInit(Object o)
    • isMarshallable

      public boolean isMarshallable(Object o)
      Specified by:
      isMarshallable in interface org.infinispan.commons.marshall.Marshaller
      Specified by:
      isMarshallable in interface org.infinispan.commons.marshall.StreamAwareMarshaller
    • sizeEstimate

      public int sizeEstimate(Object o)
      Specified by:
      sizeEstimate in interface org.infinispan.commons.marshall.StreamAwareMarshaller
    • mediaType

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