/** * Shutdown call. * <p> * @param cacheName * @throws IOException */ @Override public void handleDispose( String cacheName ) throws IOException { cache.dispose(); } }
/** * Removes an item. * <p> * @param cacheName * @param key * @throws IOException */ @Override public void handleRemove( String cacheName, K key ) throws IOException { cache.remove( key ); }
/** * Clears the region. * <p> * @param cacheName * @throws IOException */ @Override public void handleRemoveAll( String cacheName ) throws IOException { cache.removeAll(); }
if ( aux == null || aux.getStatus() != CacheStatus.ALIVE || ( fromRemote && aux.getCacheType() == CacheType.REMOTE_CACHE ) ) log.info( "In DISPOSE, [" + this.cacheAttr.getCacheName() + "] SKIPPING auxiliary [" + aux.getCacheName() + "] fromRemote [" + fromRemote + "]" ); log.info( "In DISPOSE, [" + this.cacheAttr.getCacheName() + "] auxiliary [" + aux.getCacheName() + "]" ); if ( aux.getCacheType() == CacheType.DISK_CACHE ) log.info( "In DISPOSE, [" + this.cacheAttr.getCacheName() + "] put " + numToFree + " into auxiliary " + aux.getCacheName() ); aux.dispose();
if ( aux != null && aux.getCacheType() == CacheType.DISK_CACHE ) aux.update( ce ); log.debug( "spoolToDisk done for: " + ce.getKey() + " on disk cache[" + aux.getCacheName() + "]" );
if ( aux != null && aux.getCacheType() == CacheType.DISK_CACHE ) aux.update( ce );
if ( aux != null && ( aux.getCacheType() == CacheType.DISK_CACHE || !localOnly ) ) log.debug( "Removing All keys from cacheType" + aux.getCacheType() ); aux.removeAll();
CacheType cacheType = aux.getCacheType(); boolean b = aux.remove( key );
ICacheElement<String, String> after = cache.get( key );
if ( ic.getStatus() == CacheStatus.ALIVE )
/** * Puts an item into the cache. * <p> * @param item * @throws IOException */ @Override public void handlePut( ICacheElement<K, V> item ) throws IOException { try { cache.update( item ); } catch ( Exception e ) { // swallow } }
/** @return info on the listeners */ @Override public String toString() { StringBuilder buffer = new StringBuilder(); buffer.append( "\n CacheListeners" ); if ( cache != null ) { buffer.append( "\n Region = " + cache.getCacheName() ); } if ( eventQMap != null ) { buffer.append( "\n Event Queue Map " ); buffer.append( "\n size = " + eventQMap.size() ); Iterator<Map.Entry<Long, ICacheEventQueue<K, V>>> it = eventQMap.entrySet().iterator(); while ( it.hasNext() ) { buffer.append( "\n Entry: " + it.next() ); } } else { buffer.append( "\n No Listeners. " ); } return buffer.toString(); } }
if ( aux == null || aux.getStatus() != CacheStatus.ALIVE || ( fromRemote && aux.getCacheType() == CacheType.REMOTE_CACHE ) ) log.info( "In DISPOSE, [" + this.cacheAttr.getCacheName() + "] SKIPPING auxiliary [" + aux.getCacheName() + "] fromRemote [" + fromRemote + "]" ); log.info( "In DISPOSE, [" + this.cacheAttr.getCacheName() + "] auxiliary [" + aux.getCacheName() + "]" ); if ( aux.getCacheType() == CacheType.DISK_CACHE ) log.info( "In DISPOSE, [" + this.cacheAttr.getCacheName() + "] put " + numToFree + " into auxiliary " + aux.getCacheName() ); aux.dispose();
log.debug( "Auxilliary cache type: " + aux.getCacheType() ); if ( aux.getCacheType() == CacheType.REMOTE_CACHE ) aux.update( cacheElement ); if ( log.isDebugEnabled() ) else if ( aux.getCacheType() == CacheType.LATERAL_CACHE ) aux.update( cacheElement ); if ( log.isDebugEnabled() ) else if ( aux.getCacheType() == CacheType.DISK_CACHE ) && cacheElement.getElementAttributes().getIsSpool() ) aux.update( cacheElement ); if ( log.isDebugEnabled() )
if ( aux != null && ( aux.getCacheType() == CacheType.DISK_CACHE || !localOnly ) ) log.debug( "Removing All keys from cacheType" + aux.getCacheType() ); aux.removeAll();
CacheType cacheType = aux.getCacheType(); boolean b = aux.remove( key );
ICacheElement<String, String> after = cache.get( key );
if ( ic.getStatus() == CacheStatus.ALIVE )