/** remove an entry from the pipe... (marks it evicted to be skipped later) */ public boolean unlinkEntry(LRUClockNode entry) { if (logger.isTraceEnabled(LogMarker.LRU_CLOCK)) { logger.trace( LogMarker.LRU_CLOCK, LocalizedMessage.create(LocalizedStrings.NewLRUClockHand_UNLINKENTRY_CALLED, entry)); } entry.setEvicted(); stats().incDestroys(); synchronized (lock) { LRUClockNode next = entry.nextLRUNode(); LRUClockNode prev = entry.prevLRUNode(); if (next == null || prev == null) { // not in the list anymore. return false; } next.setPrevLRUNode(prev); prev.setNextLRUNode(next); entry.setNextLRUNode(null); entry.setPrevLRUNode(null); } return true; }