Class ProtobufValueWrapper

  • All Implemented Interfaces:
    org.infinispan.commons.marshall.WrappedBytes

    @ProtoTypeId(11)
    public final class ProtobufValueWrapper
    extends Object
    implements org.infinispan.commons.marshall.WrappedBytes
    This is used to wrap binary values encoded with Protocol Buffers. ProtobufMessageBridge is used as a class bridge to allow indexing of the binary payload.
    Since:
    6.0
    Author:
    anistor@redhat.com
    • Constructor Detail

      • ProtobufValueWrapper

        @ProtoFactory
        public ProtobufValueWrapper​(byte[] binary)
    • Method Detail

      • getBinary

        @ProtoField(number=1)
        public byte[] getBinary()
        Gets the internal byte array. Callers should not modify the contents of the array.
        Returns:
        the wrapped byte array
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getBytes

        public byte[] getBytes()
        Specified by:
        getBytes in interface org.infinispan.commons.marshall.WrappedBytes
      • backArrayOffset

        public int backArrayOffset()
        Specified by:
        backArrayOffset in interface org.infinispan.commons.marshall.WrappedBytes
      • getLength

        public int getLength()
        Specified by:
        getLength in interface org.infinispan.commons.marshall.WrappedBytes
      • getByte

        public byte getByte​(int offset)
        Specified by:
        getByte in interface org.infinispan.commons.marshall.WrappedBytes
      • equalsWrappedBytes

        public boolean equalsWrappedBytes​(org.infinispan.commons.marshall.WrappedBytes other)
        Specified by:
        equalsWrappedBytes in interface org.infinispan.commons.marshall.WrappedBytes