|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.environment.time.simulated.DirectTimeSource
public class DirectTimeSource
Field Summary | |
---|---|
protected java.lang.String |
instance
|
protected Logger |
logger
|
protected java.util.HashSet<rice.environment.time.simulated.DirectTimeSource.BlockingTimerTask> |
pendingTimers
When destry is called, throw an interrupted exception on all of these. |
protected SelectorManager |
selectorManager
|
protected long |
time
|
Constructor Summary | |
---|---|
DirectTimeSource(long time)
|
|
DirectTimeSource(long time,
java.lang.String instance)
|
|
DirectTimeSource(Parameters p)
|
Method Summary | |
---|---|
long |
currentTimeMillis()
|
void |
destroy()
TODO: Get the synchronization on this correct |
void |
incrementTime(int millis)
Should be synchronized on the selectorManager |
void |
setLogManager(LogManager manager)
|
void |
setSelectorManager(SelectorManager sm)
|
void |
setTime(long newTime)
Should be synchronized on the selectorManager |
void |
sleep(long delay)
block for this many millis |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long time
protected Logger logger
protected java.lang.String instance
protected SelectorManager selectorManager
protected java.util.HashSet<rice.environment.time.simulated.DirectTimeSource.BlockingTimerTask> pendingTimers
Constructor Detail |
---|
public DirectTimeSource(long time)
public DirectTimeSource(long time, java.lang.String instance)
public DirectTimeSource(Parameters p)
Method Detail |
---|
public void setLogManager(LogManager manager)
public void setSelectorManager(SelectorManager sm)
public long currentTimeMillis()
currentTimeMillis
in interface TimeSource
public void setTime(long newTime)
newTime
- public void incrementTime(int millis)
public void sleep(long delay) throws java.lang.InterruptedException
TimeSource
sleep
in interface TimeSource
delay
- the amount of time to sleep
java.lang.InterruptedException
public void destroy()
destroy
in interface Destructable
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |