Examples of SyncConsistentHashFactory


Examples of org.infinispan.distribution.ch.SyncConsistentHashFactory

                    .l1()
                        .lifespan(5, TimeUnit.MINUTES)
                    .hash()
                        .numOwners(2)
                        .numSegments(40)
                        .consistentHashFactory(new SyncConsistentHashFactory())
                .stateTransfer()
                    .fetchInMemoryState(false)
                .eviction()
                    .strategy(EvictionStrategy.LIRS)
                    .maxEntries(100000)
View Full Code Here

Examples of org.infinispan.distribution.ch.SyncConsistentHashFactory

                    .l1()
                        .lifespan(5, TimeUnit.MINUTES)
                    .hash()
                        .numOwners(2)
                        .numSegments(40)
                        .consistentHashFactory(new SyncConsistentHashFactory())
                    .stateTransfer()
                        .fetchInMemoryState(false)
                    .timeout(config.getClusterTimeout())
                .eviction()
                    .strategy(EvictionStrategy.LIRS)
View Full Code Here

Examples of org.infinispan.distribution.ch.SyncConsistentHashFactory

      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

Examples of org.infinispan.distribution.ch.SyncConsistentHashFactory

      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

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

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

      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

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

   // 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

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

*/
@Test(groups = "unit", testName = "distribution.ch.SyncConsistentHashFactoryTest")
public class SyncConsistentHashFactoryTest extends DefaultConsistentHashFactoryTest {
   @Override
   protected ConsistentHashFactory createConsistentHashFactory() {
      return new SyncConsistentHashFactory();
   }
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.