Class JavaStringHash

java.lang.Object
org.apache.pulsar.client.impl.JavaStringHash
All Implemented Interfaces:
Hash, Hash

public class JavaStringHash extends Object implements Hash
  • Method Details

    • getInstance

      public static Hash getInstance()
    • makeHash

      public int makeHash(String s)
      Description copied from interface: Hash
      Generate the hash of a given String.
      Specified by:
      makeHash in interface Hash
      Returns:
      The hash of , which is non-negative integer.
    • makeHash

      public int makeHash(byte[] b)
      Specified by:
      makeHash in interface Hash