Example #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);
 }
Example #2
0
 @GossipRate
 public double rate() {
   return p.getRate() * Math.pow(2, dilationLevel);
 }