Class ImmutableProtoStreamMarshaller

    • Field Detail

      • serializationContext

        protected final org.infinispan.protostream.ImmutableSerializationContext serializationContext
    • Constructor Detail

      • ImmutableProtoStreamMarshaller

        public ImmutableProtoStreamMarshaller​(org.infinispan.protostream.ImmutableSerializationContext serializationContext)
    • Method Detail

      • getSerializationContext

        public org.infinispan.protostream.ImmutableSerializationContext getSerializationContext()
      • objectFromByteBuffer

        public Object objectFromByteBuffer​(byte[] buf,
                                           int offset,
                                           int length)
                                    throws IOException,
        Description copied from interface: Marshaller
        Unmarshalls an object from a specific portion of a byte array.
        buf - byte array containing the binary representation of an object. Must not be null.
        offset - point in buffer to start reading
        length - number of bytes to consider
        an object
        IOException - if unmarshalling cannot complete due to some I/O error
        ClassNotFoundException - if the class of the object trying to unmarshall is unknown
      • isMarshallable

        public boolean isMarshallable​(Object o)
        Description copied from interface: Marshaller
        A method that checks whether the given object is marshallable as per the rules of this marshaller.
        o - object to verify whether it's marshallable or not
        true if the object is marshallable, otherwise false
      • objectToBuffer

        protected ByteBuffer objectToBuffer​(Object o,
                                            int estimatedSize)
                                     throws IOException
        Description copied from class: AbstractMarshaller
        This is a convenience method for converting an object into a ByteBuffer which takes an estimated size as parameter. A ByteBuffer allows direct access to the byte array with minimal array copying
        Specified by:
        objectToBuffer in class AbstractMarshaller
        o - object to marshall
        estimatedSize - an estimate of how large the resulting byte array may be
      • mediaType

        public org.infinispan.commons.dataconversion.MediaType mediaType()
        the MediaType associated with the content produced by the marshaller