org.mpisws.p2p.transport.direct
Class EventSimulator
java.lang.Object
org.mpisws.p2p.transport.direct.EventSimulator
- Direct Known Subclasses:
- BasicNetworkSimulator
public class EventSimulator
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
environment
protected Environment environment
random
protected RandomSource random
manager
protected SelectorManager manager
timeSource
protected TimeSource timeSource
logger
protected Logger logger
EventSimulator
public EventSimulator(Environment env,
RandomSource random,
Logger logger)
setMaxSpeed
public void setMaxSpeed(float speed)
setFullSpeed
public void setFullSpeed()
simulate
protected boolean simulate()
throws java.lang.InterruptedException
- Delivers 1 message. Will advance the clock if necessary.
If there is a message in the queue, deliver that and return true. If there
is a message in the taskQueue, update the clock if necessary, deliver that,
then return true. If both are empty, return false;
- Throws:
java.lang.InterruptedException
start
public void start()
stop
public void stop()
Copyright © 2001-2005 - Rice Pastry.