Examples of localNodeIsPrimaryOwner()


Examples of org.infinispan.interceptors.locking.ClusteringDependentLogic.localNodeIsPrimaryOwner()

   private <K, V> CacheHelper<K, V> create(List<Cache<K, V>> cacheList) {
      CacheHelper<K, V> cacheHelper = new CacheHelper<>();
      for (Cache<K, V> cache : cacheList) {
         ClusteringDependentLogic clusteringDependentLogic = extractComponent(cache, ClusteringDependentLogic.class);
         log.debugf("owners for key %s are %s", key, clusteringDependentLogic.getOwners(key));
         if (clusteringDependentLogic.localNodeIsPrimaryOwner(key)) {
            log.debug("Cache " + address(cache) + " is the primary owner");
            assertTrue(cacheHelper.addCache(Ownership.PRIMARY_OWNER, cache));
         } else if (clusteringDependentLogic.localNodeIsOwner(key)) {
            log.debug("Cache " + address(cache) + " is the backup owner");
            assertTrue(cacheHelper.addCache(Ownership.BACKUP_OWNER, cache));
View Full Code Here

Examples of org.infinispan.interceptors.locking.ClusteringDependentLogic.localNodeIsPrimaryOwner()

   }

   private void write(String key, Object value) {
      Cache cache1 = cache(0, cacheName());
      ClusteringDependentLogic cdl = cache1.getAdvancedCache().getComponentRegistry().getComponent(ClusteringDependentLogic.class);
      boolean onCache1 = cdl.localNodeIsPrimaryOwner(key);
      CacheWriter cacheWriter;
      if (onCache1) {
         cacheWriter = (CacheWriter) TestingUtil.getCacheLoader(cache1);
      } else {
         cacheWriter = (CacheWriter) TestingUtil.getCacheLoader(cache(1, cacheName()));
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.