Package org.olat.core.util.cache.n

Examples of org.olat.core.util.cache.n.CacheWrapper.update()


      getWindowControl().setInfo("sending "+cnt+" messages took "+inmilis+" ms, avg per messages was "+avg+" ns = "+avgmilis+" ms");
    } else if (source == testCachePut) {
      CacheWrapper cw = CoordinatorManager.getCoordinator().getCacher().getOrCreateCache(this.getClass(), "cachetest").
        getOrCreateChildCacheWrapper(ORES_CACHE_TEST);
      // we explicitly use put and not putSilent to show that a put invalidates (and thus removes) this key of this cache in all other cluster nodes.
      cw.update("akey", "hello");
      updateCacheInfo();
    } else if (source == testCachePut2) {
      // we explicitly use put and not putSilent to show that a put invalidates (and thus removes) this key of this cache in all other cluster nodes.
      CacheWrapper cw = CoordinatorManager.getCoordinator().getCacher().getOrCreateCache(this.getClass(), "cachetest").
        getOrCreateChildCacheWrapper(ORES_CACHE_TEST);
View Full Code Here


      updateCacheInfo();
    } else if (source == testCachePut2) {
      // we explicitly use put and not putSilent to show that a put invalidates (and thus removes) this key of this cache in all other cluster nodes.
      CacheWrapper cw = CoordinatorManager.getCoordinator().getCacher().getOrCreateCache(this.getClass(), "cachetest").
        getOrCreateChildCacheWrapper(ORES_CACHE_TEST);
      cw.update("akey", "world");
      updateCacheInfo();
    } else if (source == testSFUPerf) {
      // acquire a sync 1000x times (does internally a select-for-update on the database)
      int cnt = 1000;
      long start = System.nanoTime();
View Full Code Here

          addPropertyToCache(m, property);
        }
        // we use a putSilent here (no invalidation notifications to other cluster nodes), since
        // we did not generate new data, but simply asked to reload it.
        if (prepareForNewData) {
          cw.update(FULLUSERSET, (Serializable) m);
        } else {
          cw.put(FULLUSERSET, (Serializable) m);
        }
      } else {
        // still in cache.
View Full Code Here

          cw.put(FULLUSERSET, (Serializable) m);
        }
      } else {
        // still in cache.
        if (prepareForNewData) { // but we need to notify that data has changed: we reput the data into the cache - a little hacky yes
          cw.update(FULLUSERSET, (Serializable) m);
        }
      }
      return m;
    }
  }
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.