Package org.infinispan.commons.hash

Examples of org.infinispan.commons.hash.MurmurHash2$Externalizer


@Test(testName = "util.HashFunctionTest", groups = "unit")
public class HashFunctionTest extends AbstractInfinispanTest {

   public void testMurmurHash2Consistency() {
      testHashConsistency(new MurmurHash2());
   }
View Full Code Here


   }

   static List<Integer> generateKeys() {
      List<Integer> keys;
      /** this is what's used for inducing ordering */
      MurmurHash2 hashFunction = new MurmurHash2();
      keys = new ArrayList<Integer>(2);
      int count = 0;
      keys.add(count);
      while (keys.size() < 2) {
         final int hash = hashFunction.hash(++count);
         if (!keys.contains(hash)) keys.add(count);
      }
      return keys;
   }
View Full Code Here

@Test(testName = "util.HashFunctionTest", groups = "unit")
public class HashFunctionTest extends AbstractInfinispanTest {

   public void testMurmurHash2Consistency() {
      testHashConsistency(new MurmurHash2());
   }
View Full Code Here

   }

   static List<Integer> generateKeys() {
      List<Integer> keys;
      /** this is what's used for inducing ordering */
      MurmurHash2 hashFunction = new MurmurHash2();
      keys = new ArrayList<Integer>(2);
      int count = 0;
      keys.add(count);
      while (keys.size() < 2) {
         final int hash = hashFunction.hash(++count);
         if (!keys.contains(hash)) keys.add(count);
      }
      return keys;
   }
View Full Code Here

TOP

Related Classes of org.infinispan.commons.hash.MurmurHash2$Externalizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.