public void close() { if (cacheAccess != null) { try { cacheAccess.close(); } finally { cacheAccess = null; } } }
public DefaultPersistentDirectoryStore open() { GFileUtils.mkdirs(dir); cacheAccess = createCacheAccess(); try { cacheAccess.open(lockOptions); } catch (Throwable e) { throw new CacheOpenException(String.format("Could not open %s.", this), e); } return this; }
public <K, V> PersistentIndexedCache<K, V> createCache( PersistentIndexedCacheParameters<K, V> parameters) { return cacheAccess.newCache(parameters); }
public void longRunningOperation(String operationDisplayName, Runnable action) { cacheAccess.longRunningOperation(operationDisplayName, action); }
public <T> T longRunningOperation(String operationDisplayName, Factory<? extends T> action) { return cacheAccess.longRunningOperation(operationDisplayName, action); }
public void useCache(String operationDisplayName, Runnable action) { cacheAccess.useCache(operationDisplayName, action); }
public <T> T useCache(String operationDisplayName, Factory<? extends T> action) { return cacheAccess.useCache(operationDisplayName, action); }
public <K, V> PersistentIndexedCache<K, V> createCache( String name, Class<K> keyType, Serializer<V> valueSerializer) { return cacheAccess.newCache( new PersistentIndexedCacheParameters<K, V>(name, keyType, valueSerializer)); }