Class sim.process
All Packages Class Hierarchy This Package Previous Next Index
Class sim.process
java.lang.Object
|
+----sim.process
- public class process
- extends Object
- implements Runnable
abstract process class
provides simple Simula-like scheduling functions
void body() needs to be overwritten
-
name
- name of this process as given in constructor
-
process(String)
-
process constructor
-
active()
- test if process is active, i.e.
-
cancel()
- make this process idle (unscheduled and not running)
-
print()
- print name, state, and scheduled event time for process
-
run()
- main body for thread
-
scheduled()
- test for scheduled (has an event notice; false if running)
-
terminate()
-
make process unrunnable (no longer activatable);
note that there is no terminate_and_delete() as Java
doesn't need to delete objects; similarly, you cannot rely
on clean-up being done in the destructor
-
terminated()
- test if this process is terminated
-
waitq(Queue)
-
enqueue reference to this process in queue q, and passivate
note that there is no enqueue_proc/dequeue_proc anymore;
use Queue Enqueue/Dequeue instead
name
public String name
- name of this process as given in constructor
process
public process(String s)
- process constructor
- Parameters:
- name - name of the process
run
public synchronized void run()
- main body for thread
active
public boolean active()
- test if process is active, i.e. running or scheduled
scheduled
public boolean scheduled()
- test for scheduled (has an event notice; false if running)
terminated
public boolean terminated()
- test if this process is terminated
cancel
public void cancel()
- make this process idle (unscheduled and not running)
terminate
public void terminate()
- make process unrunnable (no longer activatable);
note that there is no terminate_and_delete() as Java
doesn't need to delete objects; similarly, you cannot rely
on clean-up being done in the destructor
waitq
public void waitq(Queue q)
- enqueue reference to this process in queue q, and passivate
note that there is no enqueue_proc/dequeue_proc anymore;
use Queue Enqueue/Dequeue instead
- Parameters:
- q - queue in which to insert process
- See Also:
- Queue
print
public void print()
- print name, state, and scheduled event time for process
All Packages Class Hierarchy This Package Previous Next Index