Пример #1
0
 @GossipUpdate
 @Override
 public void update(Protocol other) {
   Dilator that = (Dilator) other;
   for (int i = 0; i < dilationLevel; i++) {
     RuntimeState rts = getRuntimeState();
     assert (rts != null);
     if (rts.getRandom().nextBoolean()) {
       return;
     }
   }
   p.update(that.p);
 }
Пример #2
0
 @GossipRate
 public double rate() {
   return p.getRate() * Math.pow(2, dilationLevel);
 }