@Override public void remove(Object key) { ehcache.remove(key); }
@Override public boolean remove(Object key) { final Sync sync = getLockForKey(key); sync.lock(LockType.WRITE); try { return super.remove(key); } finally { sync.unlock(LockType.WRITE); } }
@Override public boolean remove(Serializable key, boolean doNotNotifyCacheReplicators) { final Sync sync = getLockForKey(key); sync.lock(LockType.WRITE); try { return super.remove(key, doNotNotifyCacheReplicators); } finally { sync.unlock(LockType.WRITE); } }
@Override public boolean remove(Serializable key) { final Sync sync = getLockForKey(key); sync.lock(LockType.WRITE); try { return super.remove(key); } finally { sync.unlock(LockType.WRITE); } }
@Override public boolean remove(Object key, final boolean doNotNotifyCacheReplicators) { final Sync sync = getLockForKey(key); sync.lock(LockType.WRITE); try { return super.remove(key, doNotNotifyCacheReplicators); } finally { sync.unlock(LockType.WRITE); } }
/** * {@inheritDoc } */ @Override public void processPageEvent( PageEvent event ) { String strPattern = "page_id=" + event.getPage( ).getId( ); for ( String strKey : (List<String>) blockingCache.getKeys( ) ) { if ( strKey.contains( strPattern ) && ( event.getEventType( ) != PageEvent.PAGE_CREATED ) ) { blockingCache.remove( strKey ); } } } }
/** * Clear a cache entry for a given name. * * @param key name that entry is stored as. * @return boolean value will be false if entry not found and true if entry was found and removed. * @throws CacheException in the event ehcache throws an exception it will be wrapped. */ @Override public boolean clear( Object key ) throws CacheException { boolean result; if ( cache == null ) { String error = "clear detected null cache name [" + name + "]"; throw new CacheException( GlobalErrIds.FT_NULL_CACHE, error ); } try { result = cache.remove( key ); } catch ( net.sf.ehcache.CacheException ce ) { String error = "clear cache name [" + name + "] key [" + key + "] caught CacheException=" + ce.getMessage(); throw new CacheException( GlobalErrIds.FT_CACHE_CLEAR_ERR, error, ce ); } return result; }