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