Beispiel #1
0
 @Override
 public void call(RelayObserver<T> t1) {
   NodeList.Node<Object> l;
   if (!state.terminated) {
     // ignore stale entries if still active
     l = state.replayObserverFromIndexTest(state.head(), t1, scheduler.now());
   } else {
     // accept all if terminated
     l = state.replayObserverFromIndex(state.head(), t1);
   }
   t1.index(l);
 }
Beispiel #2
0
 @Override
 public void evict(NodeList<Object> t1) {
   long now = scheduler.now();
   while (!t1.isEmpty()) {
     NodeList.Node<Object> n = t1.head.next;
     if (test(n.value, now)) {
       t1.removeFirst();
     } else {
       break;
     }
   }
 }
Beispiel #3
0
 @Override
 public Object call(Object t1) {
   return new Timestamped<Object>(scheduler.now(), t1);
 }