|
SSJ V. 1.2.5. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.simprocs.AbstractSimProcess
umontreal.iro.lecuyer.simprocs.SimProcess
public abstract class SimProcess
Represents a simulation process with an associated Java thread. The simulation process threads are synchronized so only one process runs at a time.
Note: the user needs to ensure that the actions method of any process can be terminated, i.e., no infinite loops. If such a method never terminates, threads will not be recycled, causing memory problems.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.simprocs.AbstractSimProcess |
---|
DEAD, DELAYED, EXECUTING, INITIAL, SUSPENDED |
Constructor Summary | |
---|---|
SimProcess()
Constructs a new process without scheduling it. |
Method Summary | |
---|---|
void |
delay(double delay)
Suspends the execution of the currently executing process and schedules it to resume its execution in delay units of simulation time. |
static void |
init()
Initializes the process-driven simulation. |
static void |
init(EventList evlist)
Initializes the simulation and sets the given event list evlist to be used by the simulation executive. |
void |
kill()
Terminates the life of this process and sets its state to DEAD, after canceling its activating event if there is one. |
static void |
killAll()
Kills all instances of the class SimProcess. |
void |
suspend()
This method can only be invoked for the EXECUTING or a DELAYED process. |
Methods inherited from class umontreal.iro.lecuyer.simprocs.AbstractSimProcess |
---|
actions, cancel, currentProcess, getDelay, getState, isAlive, reschedule, resume, schedule, scheduleNext |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimProcess()
Method Detail |
---|
public static void init()
Sim.init
.
public static void init(EventList evlist)
evlist
- selected event list implementationpublic void delay(double delay)
AbstractSimProcess
delay
in class AbstractSimProcess
delay
- delay, in simulation time, before the process is resumedpublic void suspend()
AbstractSimProcess
suspend
in class AbstractSimProcess
public void kill()
AbstractSimProcess
kill
in class AbstractSimProcess
public static void killAll()
Note: this method is unstable under Java versions 1.4 or greater.
|
SSJ V. 1.2.5. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |