((Block)eldest.getValue()).flush();
try{ ((Block)eldest.getValue()).flush();  CacheEvent event = new CacheEvent(eldest.getValue(),CacheEvent.REMOVED); Iterator listeners=cacheListeners.iterator(); while(listeners.hasNext()) { ((CacheListener)listeners.next()).elementRemoved(event); } }catch(IOException e) { log.error("Exception when flushing a block from the cache", e); }
	protected boolean removeEldestEntry(Map.Entry eldest) {		if(size()>MAX_SIZE) {			((Block)eldest.getValue()).flush();			return true;		} else			return false;	}