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; }
private CacheLine<V> tryRegister(long loadTimeNanos, CacheLine<V> line) { if (loadTimeNanos > 0) { ExecutionPool.addPulse(line); } return line; }
@Override public void onEviction(Object key, CacheLine<V> value) { ExecutionPool.removePulse(value); }