Class XxHash

  • All Implemented Interfaces:
    HashFunction

    public class XxHash
    extends Object
    implements HashFunction
    The implementation of HashFunction interface. The XxHash uses XXH64 version xxHash with a seed of 0.
    • Constructor Detail

      • XxHash

        public XxHash()
    • Method Detail

      • hashBytes

        public long hashBytes​(byte[] input)
        Description copied from interface: HashFunction
        compute the hash value for a byte array.
        Specified by:
        hashBytes in interface HashFunction
        Parameters:
        input - the input byte array
        Returns:
        a result of long value.
      • hashByteBuffer

        public long hashByteBuffer​(ByteBuffer input)
        Description copied from interface: HashFunction
        compute the hash value for a ByteBuffer.
        Specified by:
        hashByteBuffer in interface HashFunction
        Parameters:
        input - the input ByteBuffer
        Returns:
        a result of long value.