@Test public void testJdkHashFunction() { HashFunction function = new JdkHashFunction(8); Assert.assertEquals(function.getType(), HashType.JDK); for (int i = 0; i < 1000; i++) { String uuid = UUID.randomUUID().toString(); int index = function.indexOf(uuid); Assert.assertTrue(index >= 0); Assert.assertTrue(index <= 7); } }
private JdkHashFunction() { }
JdkHashFunction implements HashFunction { private JdkHashFunction() { } }
JdkHashFunction implements HashFunction { private JdkHashFunction() { } private  JdkHashFunction();  JdkHashFunction(int partitions); }
JdkHashFunction implements HashFunction { private JdkHashFunction() { } private  JdkHashFunction();  JdkHashFunction(int partitions); @Override int indexOf(Object key); @Override int indexOf(List<Object> keys); @Override HashType getType(); }
JdkHashFunction implements HashFunction { private JdkHashFunction() { } private  JdkHashFunction();  JdkHashFunction(int partitions); @Override int indexOf(Object key); @Override int indexOf(List<Object> keys); @Override HashType getType();  }