Package org.infinispan.distribution.ch.impl

Examples of org.infinispan.distribution.ch.impl.SyncConsistentHashFactory


   // percentiles to print
   public static final double[] PERCENTILES = { .999 };

   private DefaultConsistentHash createConsistentHash(int numSegments, int numOwners, int numNodes) {
      MurmurHash3 hash = new MurmurHash3();
      SyncConsistentHashFactory chf = new SyncConsistentHashFactory();
      DefaultConsistentHash ch = chf.create(hash, numOwners, numSegments, createAddresses(numNodes), null);
      return ch;
   }
View Full Code Here


      cb.clustering().cacheMode(CacheMode.DIST_SYNC);

      Configuration c = cb.build();
      Assert.assertNull(c.clustering().hash().consistentHashFactory());

      SyncConsistentHashFactory consistentHashFactory = new SyncConsistentHashFactory();
      cb.clustering().hash().consistentHashFactory(consistentHashFactory);
      c = cb.build();
      Assert.assertSame(c.clustering().hash().consistentHashFactory(), consistentHashFactory);
   }
View Full Code Here

   // percentiles to print
   public static final double[] PERCENTILES = { .999 };

   protected DefaultConsistentHash createConsistentHash(int numSegments, int numOwners, List<Address> members) {
      MurmurHash3 hash = new MurmurHash3();
      ConsistentHashFactory<DefaultConsistentHash> chf = new SyncConsistentHashFactory();
      DefaultConsistentHash ch = chf.create(hash, numOwners, numSegments, members, null);
      return ch;
   }
View Full Code Here

*/
@Test(groups = "unit", testName = "distribution.ch.SyncConsistentHashFactoryTest")
public class SyncConsistentHashFactoryTest extends DefaultConsistentHashFactoryTest {
   @Override
   protected ConsistentHashFactory createConsistentHashFactory() {
      return new SyncConsistentHashFactory();
   }
View Full Code Here

TOP

Related Classes of org.infinispan.distribution.ch.impl.SyncConsistentHashFactory

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.