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