/** * Flushes all cache items from memory to auxiliary caches and close the auxiliary caches. */ @Override public void dispose() { dispose( false ); }
/** * Flushes all cache items from memory to auxiliary caches and close the auxiliary caches. */ @Override public void dispose() { dispose( false ); }
/** * @param name * @param fromRemote */ public void freeCache( String name, boolean fromRemote ) { CompositeCache<?, ?> cache = (CompositeCache<?, ?>) caches.remove( name ); if ( cache != null ) { cache.dispose( fromRemote ); } }
/** * @param name * @param fromRemote */ public void freeCache( String name, boolean fromRemote ) { CompositeCache<?, ?> cache = (CompositeCache<?, ?>) caches.remove( name ); if ( cache != null ) { cache.dispose( fromRemote ); } }
/** * Dispose this region. Flushes objects to and closes auxiliary caches. This is a shutdown * command! * <p> * To simply remove all elements from the region use clear(). */ @Override public void dispose() { this.getCacheControl().dispose(); }
/** * Dispose this region. Flushes objects to and closes auxiliary caches. This is a shutdown * command! * <p> * To simply remove all elements from the region use clear(). */ @Override public void dispose() { this.getCacheControl().dispose(); }
/** * @param fromRemote */ private void release( boolean fromRemote ) { synchronized ( CompositeCacheManager.class ) { // Wait until called by the last client if ( --clients > 0 ) { if ( log.isDebugEnabled() ) { log.debug( "Release called, but " + clients + " remain" ); return; } } if ( log.isDebugEnabled() ) { log.debug( "Last client called release. There are " + caches.size() + " caches which will be disposed" ); } for (ICache<?, ?> c : caches.values() ) { CompositeCache<?, ?> cache = (CompositeCache<?, ?>) c; if ( cache != null ) { cache.dispose( fromRemote ); } } } }
/** * @param fromRemote */ private void release( boolean fromRemote ) { synchronized ( CompositeCacheManager.class ) { // Wait until called by the last client if ( clients.decrementAndGet() > 0 ) { if ( log.isDebugEnabled() ) { log.debug( "Release called, but " + clients + " remain" ); } return; } if ( log.isDebugEnabled() ) { log.debug( "Last client called release. There are " + caches.size() + " caches which will be disposed" ); } for (ICache<?, ?> c : caches.values() ) { CompositeCache<?, ?> cache = (CompositeCache<?, ?>) c; if ( cache != null ) { cache.dispose( fromRemote ); } } } }
/** * Processes a shutdown request. * <p> * @param cacheName * @param requesterId * @throws IOException */ @Override public void processDispose( String cacheName, long requesterId ) throws IOException { CompositeCache<K, V> cache = getCacheManager().getCache( cacheName ); cache.dispose(); }
/** * Processes a shutdown request. * <p> * @param cacheName * @param requesterId * @throws IOException */ @Override public void processDispose( String cacheName, long requesterId ) throws IOException { CompositeCache<K, V> cache = getCacheManager().getCache( cacheName ); cache.dispose(); }