Examples of RndKeyGenerator


Examples of org.infinispan.affinity.impl.RndKeyGenerator

      filter = new ArrayList<Address>();
      filter.add(caches.get(0).getAdvancedCache().getRpcManager().getTransport().getAddress());
      filter.add(caches.get(1).getAdvancedCache().getRpcManager().getTransport().getAddress());
      cacheManager = caches.get(0).getCacheManager();
      keyAffinityService = (KeyAffinityServiceImpl<Object>) KeyAffinityServiceFactory.
            newKeyAffinityService(cacheManager.getCache(cacheName), filter, new RndKeyGenerator(),
                  executor, 100);
   }
View Full Code Here

Examples of org.infinispan.affinity.impl.RndKeyGenerator

      manager1 = TestCacheManagerFactory.createClusteredCacheManager(configurationBuilder);
      manager1.defineConfiguration("test", configurationBuilder.build());
      cache1 = manager1.getCache("test").getAdvancedCache();
      ex1 = Executors.newSingleThreadExecutor();
      keyAffinityService1 = KeyAffinityServiceFactory.newLocalKeyAffinityService(cache1, new RndKeyGenerator(), ex1, KEY_QUEUE_SIZE);
      log.trace("Address for manager1: " + manager1.getAddress());

      manager2 = TestCacheManagerFactory.createClusteredCacheManager(configurationBuilder);
      manager2.defineConfiguration("test", configurationBuilder.build());
      cache2 = manager2.getCache("test").getAdvancedCache();
      ex2 = Executors.newSingleThreadExecutor();
      keyAffinityService2 = KeyAffinityServiceFactory.newLocalKeyAffinityService(cache2, new RndKeyGenerator(), ex2, KEY_QUEUE_SIZE);
      log.trace("Address for manager2: " + manager2.getAddress());

      TestingUtil.blockUntilViewsReceived(60000, cache1, cache2);
      Thread.sleep(5000);
   }
View Full Code Here

Examples of org.infinispan.affinity.impl.RndKeyGenerator

   @Override
   protected void createService() {
      {
         cacheManager = caches.get(0).getCacheManager();
         keyAffinityService = (KeyAffinityServiceImpl<Object>) KeyAffinityServiceFactory.
               newLocalKeyAffinityService(cacheManager.getCache(cacheName), new RndKeyGenerator(),
                     executor, 100);
      }
   }
View Full Code Here

Examples of org.infinispan.affinity.impl.RndKeyGenerator

      assertEquals("v", cache(0, cacheName).get("k"));
      assertEquals("v", cache(1, cacheName).get("k"));


      keyAffinityService = (KeyAffinityServiceImpl<Object>) KeyAffinityServiceFactory.newKeyAffinityService(manager(0).getCache(cacheName),
            executor, new RndKeyGenerator(), 100);
   }
View Full Code Here

Examples of org.infinispan.affinity.impl.RndKeyGenerator

   protected void createCacheManagers() throws Throwable {
      super.createCacheManagers();

      cacheManager = manager(0);
      keyAffinityService = (KeyAffinityServiceImpl<Object>) KeyAffinityServiceFactory.newKeyAffinityService(cacheManager.getCache(cacheName),
            executor, new RndKeyGenerator(), 100);
   }
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.