public SessionAwareCache (String cacheName, final CacheFactory cacheFactory, final Type type, int maxStaleness) { assert (cacheFactory != null); this.localCache = cacheFactory.get(cacheName); if (type == Type.PREPAREDPLAN) { this.distributedCache = localCache; } else { this.distributedCache = cacheFactory.get(cacheName+REPL); if (this.distributedCache == null && this.localCache != null) { this.distributedCache = this.localCache; } } this.modTime = maxStaleness * 1000; this.type = type; assert (this.localCache != null); assert (this.distributedCache != null); }
protected void stop() { if (cacheFactory != null) { cacheFactory.destroy(); } }
public SessionAwareCache (String cacheName, final CacheFactory cacheFactory, final Type type, int maxStaleness) { assert (cacheFactory != null); this.localCache = cacheFactory.get(cacheName); if (type == Type.PREPAREDPLAN) { this.distributedCache = localCache; } else { this.distributedCache = cacheFactory.get(cacheName+REPL); if (this.distributedCache == null && this.localCache != null) { this.distributedCache = this.localCache; } } this.modTime = maxStaleness * 1000; this.type = type; assert (this.localCache != null); assert (this.distributedCache != null); }
config.getCacheFactory().destroy(); config.setCacheFactory(null); if (this.bufferService != null) {
public SessionAwareCache (String cacheName, final CacheFactory cacheFactory, final Type type, int maxStaleness) { assert (cacheFactory != null); this.localCache = cacheFactory.get(cacheName); if (type == Type.PREPAREDPLAN) { this.distributedCache = localCache; } else { this.distributedCache = cacheFactory.get(cacheName+REPL); if (this.distributedCache == null && this.localCache != null) { this.distributedCache = this.localCache; } } this.modTime = maxStaleness * 1000; this.type = type; assert (this.localCache != null); assert (this.distributedCache != null); }