Class ProtonSequentialTagGenerator.ProtonNumericDeliveryTag

    • Field Detail

      • tagValue

        protected final long tagValue
    • Constructor Detail

      • ProtonNumericDeliveryTag

        public ProtonNumericDeliveryTag​(long tagValue)
    • Method Detail

      • tagLength

        public int tagLength()
        Specified by:
        tagLength in interface DeliveryTag
        Returns:
        the total number of bytes needed to represent the given tag.
      • tagBytes

        public byte[] tagBytes()
        Description copied from interface: DeliveryTag
        Returns a view of this DeliveryTag object as a byte array. The returned array may be the actual underlying tag bytes or a synthetic view based on the value used to generate the tag. It is advised not to modify the returned value and copy if such modification are necessary to the caller.
        Specified by:
        tagBytes in interface DeliveryTag
        Returns:
        the underlying tag bytes as a byte array that may or may no be a singleton instance..
      • tagBuffer

        public ProtonBuffer tagBuffer()
        Description copied from interface: DeliveryTag
        Returns a view of this DeliveryTag object as a ProtonBuffer. The returned array may be the actual underlying tag bytes or a synthetic view based on the value used to generate the tag. It is advised not to modify the returned value and copy if such modification are necessary to the caller.
        Specified by:
        tagBuffer in interface DeliveryTag
        Returns:
        the ProtonBuffer view of the tag bytes.
      • release

        public void release()
        Description copied from interface: DeliveryTag
        Optional method used by tag implementations that provide pooling of tags. Implementations can do nothing here if no release mechanics are needed.
        Specified by:
        release in interface DeliveryTag
      • copy

        public DeliveryTag copy()
        Description copied from interface: DeliveryTag
        Create a copy of this delivery tag, the copy should account for any underlying pooling of tags that the tag source's implementation is using.
        Specified by:
        copy in interface DeliveryTag
        Returns:
        a copy of the underlying bytes that compose this delivery tag.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeTo

        public void writeTo​(ProtonBuffer buffer)
        Description copied from interface: DeliveryTag
        Writes the tag as a sequence of bytes into the given buffer in the manner most efficient for the underlying DeliveryTag implementation.
        Specified by:
        writeTo in interface DeliveryTag
        Parameters:
        buffer - The target buffer where the tag bytes are to be written.