Examples of ReadOnlyDataContainerBackedKeySet


Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

         checkIfCancelled();

         // Only fetch the data from the cache store if the cache store is not shared
         CacheStore cacheStore = stateTransferManager.getCacheStoreForStateTransfer();
         if (cacheStore != null) {
            for (Object key : cacheStore.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer))) {
               rebalance(key, null, numOwners, chOld, chNew, cacheStore, states, keysToRemove);
            }
         } else {
            if (trace) log.trace("No cache store or cache store is shared, not rebalancing stored keys");
         }
View Full Code Here

Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

            }

            // Only fetch the data from the cache store if the cache store is not shared
            CacheStore cacheStore = stateTransferManager.getCacheStoreForStateTransfer();
            if (cacheStore != null) {
               for (Object key : cacheStore.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer))) {
                  replicate(key, null, chOld, joiners, cacheStore, state);
               }
            } else {
               if (trace) log.trace("No cache store or cache store is shared, not replicating stored keys");
            }
View Full Code Here

Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

         if (shouldAddToMap(k, oldCH, numCopies, self)) state.put(k, ice.toInternalCacheValue());
      }

      CacheStore cacheStore = distributionManager.getCacheStoreForRehashing();
      if (cacheStore != null) {
         for (Object k: cacheStore.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer))) {
            if (!state.containsKey(k) && shouldAddToMap(k, oldCH, numCopies, self)) {
               InternalCacheValue v = loadValue(cacheStore, k);
               if (v != null) state.put(k, v);
            }
         }
View Full Code Here

Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

         }

         CacheStore cs = dmi.getCacheStoreForRehashing();
         if (cs != null) {
            if (log.isTraceEnabled()) log.trace("Examining state in cache store");
            for (Object key: cs.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer))) statemap.addState(key, cs);
         }

         // push state.
         Set<Future<Object>> pushFutures = new HashSet<Future<Object>>();
         for (Map.Entry<Address, Map<Object, InternalCacheValue>> entry : statemap.getState().entrySet()) {
View Full Code Here

Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

      // gather all keys from cache store that belong to the segments that are being removed/moved to L1
      CacheStore cacheStore = getCacheStore();
      if (cacheStore != null) {
         //todo [anistor] extend CacheStore interface to be able to specify a filter when loading keys (ie. keys should belong to desired segments)
         try {
            Set<Object> storedKeys = cacheStore.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer));
            for (Object key : storedKeys) {
               int keySegment = getSegment(key);
               if (segmentsToL1.contains(keySegment)) {
                  keysToL1.add(key);
               } else if (!newSegments.contains(keySegment)) {
View Full Code Here

Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

            }

            // Only fetch the data from the cache store if the cache store is not shared
            CacheStore cacheStore = stateTransferManager.getCacheStoreForStateTransfer();
            if (cacheStore != null) {
               for (Object key : cacheStore.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer))) {
                  replicate(key, null, chOld, joiners, cacheStore, state);
               }
            } else {
               if (trace) log.trace("No cache store or cache store is shared, not replicating stored keys");
            }
View Full Code Here

Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

      }

      // gather all keys from cache store that belong to the segments that are being removed/moved to L1
      //todo [anistor] extend CacheStore interface to be able to specify a filter when loading keys (ie. keys should belong to desired segments)
      try {
         CollectionKeyFilter filter = new CollectionKeyFilter(new ReadOnlyDataContainerBackedKeySet(dataContainer));
         persistenceManager.processOnAllStores(filter, new AdvancedCacheLoader.CacheLoaderTask() {
            @Override
            public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException {
               Object key = marshalledEntry.getKey();
               int keySegment = getSegment(key);
View Full Code Here

Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

      // gather all keys from cache store that belong to the segments that are being removed/moved to L1
      CacheStore cacheStore = getCacheStore();
      if (cacheStore != null) {
         //todo [anistor] extend CacheStore interface to be able to specify a filter when loading keys (ie. keys should belong to desired segments)
         try {
            Set<Object> storedKeys = cacheStore.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer));
            for (Object key : storedKeys) {
               int keySegment = getSegment(key);
               if (segmentsToL1.contains(keySegment)) {
                  keysToL1.add(key);
               } else if (!newSegments.contains(keySegment)) {
View Full Code Here

Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

               }

               // Only fetch the data from the cache store if the cache store is not shared
               CacheStore cacheStore = stateTransferManager.getCacheStoreForStateTransfer();
               if (cacheStore != null) {
                  for (Object key : cacheStore.loadAllKeys(new ReadOnlyDataContainerBackedKeySet(dataContainer))) {
                     replicate(key, null, chOld, chNew, cacheStore, state);
                  }
               } else {
                  if (trace) log.trace("No cache store or cache store is shared, not replicating stored keys");
               }
View Full Code Here

Examples of org.infinispan.util.ReadOnlyDataContainerBackedKeySet

         }

         AdvancedCacheLoader stProvider = persistenceManager.getStateTransferProvider();
         if (stProvider != null) {
            try {
               CollectionKeyFilter filter = new CollectionKeyFilter(new ReadOnlyDataContainerBackedKeySet(dataContainer));
               AdvancedCacheLoader.CacheLoaderTask task = new AdvancedCacheLoader.CacheLoaderTask() {
                  @Override
                  public void processEntry(MarshalledEntry me, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException {
                        int segmentId = readCh.getSegment(me.getKey());
                        if (segments.contains(segmentId)) {
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.