protected CacheLoader resolveCacheLoader() {
   CacheLoader cl = null;
   if (cacheLoaderManager != null && cacheLoaderManager.isEnabled()) {
     cl = cacheLoaderManager.getCacheLoader();
   }
   return cl;
 }
 public static CacheLoader getCacheLoader(Cache cache) {
   CacheLoaderManager clm = extractComponent(cache, CacheLoaderManager.class);
   if (clm != null && clm.isEnabled()) {
     return clm.getCacheLoader();
   } else {
     return null;
   }
 }
 public CacheStore getCacheStoreForRehashing() {
   if (cacheLoaderManager == null
       || !cacheLoaderManager.isEnabled()
       || cacheLoaderManager.isShared()) return null;
   return cacheLoaderManager.getCacheStore();
 }
Пример #4
0
 /**
  * Obtains the CacheStore that will be used for purging segments that are no longer owned by this
  * node. The CacheStore will be purged only if it is enabled and it is not shared.
  */
 private CacheStore getCacheStore() {
   if (cacheLoaderManager.isEnabled() && !cacheLoaderManager.isShared()) {
     return cacheLoaderManager.getCacheStore();
   }
   return null;
 }