Package org.infinispan.distribution.ch.impl

Examples of org.infinispan.distribution.ch.impl.SyncConsistentHashFactory.create()


   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;
   }

   private List<Address> createAddresses(int numNodes) {
      ArrayList<Address> addresses = new ArrayList<Address>(numNodes);
View Full Code Here


   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;
   }

   protected List<Address> createAddresses(int numNodes) {
      ArrayList<Address> addresses = new ArrayList<Address>(numNodes);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.