Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected Environment` | `environment`
`protected Logger` | `logger`
`protected SelectorManager` | `manager`
`protected RandomSource` | `random`
`protected TimeSource` | `timeSource`

Constructor Summary
`EventSimulator(Environment env, RandomSource random, Logger logger)`

Method Summary
`void` | `setFullSpeed()`
`void` | `setMaxSpeed(float speed)`
`protected boolean` | `simulate()` Delivers 1 message.
`void` | `start()`
`void` | `stop()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### environment

    protected Environment environment

### random

    protected RandomSource random

### manager

    protected SelectorManager manager

### timeSource

    protected TimeSource timeSource

### logger

    protected Logger logger

Constructor Detail

### EventSimulator

    public EventSimulator(Environment env,
                          RandomSource random,
                          Logger logger)

Method Detail

### 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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.