peersim.edsim
Class RegRandNextCycle

java.lang.Object
  extended by peersim.edsim.NextCycleEvent
      extended by peersim.edsim.RegRandNextCycle
All Implemented Interfaces:
java.lang.Cloneable

public class RegRandNextCycle
extends NextCycleEvent

Implements a random delay, but making sure there is exactly one call in each consecutive step time units.


Constructor Summary
RegRandNextCycle(java.lang.String n)
          Calls super constructor.
 
Method Summary
 java.lang.Object clone()
          Calls super.clone().
protected  long nextDelay(long step)
          Returns a random delay but making sure there is exactly one invocation in each consecutive interval of length step.
 
Methods inherited from class peersim.edsim.NextCycleEvent
execute
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegRandNextCycle

public RegRandNextCycle(java.lang.String n)
Calls super constructor.

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Calls super.clone().

Overrides:
clone in class NextCycleEvent
Throws:
java.lang.CloneNotSupportedException

nextDelay

protected long nextDelay(long step)
Returns a random delay but making sure there is exactly one invocation in each consecutive interval of length step. The beginning of these intervals is defined by the first invocation which is in turn defined by CDScheduler that initiates the protocol in question.

Overrides:
nextDelay in class NextCycleEvent