private V cancel(CacheLine<V> line) { // FIXME: this is a race condition, the item could expire // between the time it is replaced, and it is cancelled V oldValue = line.getValue(); ExecutionPool.removePulse(line); line.cancel(); return oldValue; }
@Override public void onEviction(Object key, CacheLine<V> value) { ExecutionPool.removePulse(value); }