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


Variable Index

 o name
name of this process as given in constructor

Constructor Index

 o process(String)
process constructor

Method Index

 o active()
test if process is active, i.e.
 o cancel()
make this process idle (unscheduled and not running)
 o print()
print name, state, and scheduled event time for process
 o run()
main body for thread
 o scheduled()
test for scheduled (has an event notice; false if running)
 o 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

 o terminated()
test if this process is terminated
 o 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

Variables

 o name
  public String name
name of this process as given in constructor

Constructors

 o process
  public process(String s)
process constructor
Parameters:
name - name of the process

Methods

 o run
  public synchronized void run()
main body for thread
 o active
  public boolean active()
test if process is active, i.e. running or scheduled
 o scheduled
  public boolean scheduled()
test for scheduled (has an event notice; false if running)
 o terminated
  public boolean terminated()
test if this process is terminated
 o cancel
  public void cancel()
make this process idle (unscheduled and not running)
 o 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

 o 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
 o print
  public void print()
print name, state, and scheduled event time for process

All Packages  Class Hierarchy  This Package  Previous  Next  Index