|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Queue
File: Queue Class Description: This is my Queue class. Its members are Proc objects. Project: MAC-5755 Sistemas Operacionais Distribuídos Authors: Fábio Grezele (fg@ime.usp.br) Rachel de Paula(rpaula@ime.usp.br) Institution: Department of Computer Science University of Sao Paulo
Method Summary | |
void |
dequeue()
This method removes the process at the beginning of the queue. |
Proc |
dequeueLast()
This method removes the process at the end of the queue. |
void |
enqueue(Proc newProcess)
This method adds a new process to the queue. |
float |
getCreation()
Reads the creationTime of the first process in the queue |
java.lang.String |
getName(int i)
Reads the process name of the i-th process in the queue |
int |
getTime(int i)
Reads the time left in the i-th process in the queue |
boolean |
isEmpty()
returns TRUE if the queue is empty. |
boolean |
isFull()
Returns TRUE if the queue is full. |
int |
length()
Returns the number of processes currently in the queue. |
void |
rotate()
This method rotates the queue, so that Queue[0] is always the element being serviced by the CPU. |
void |
setTime(int i,
int time)
Changes the time left for the process being served by the CPU which is always process 0. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public boolean isFull()
public boolean isEmpty()
public int length()
public int getTime(int i)
public java.lang.String getName(int i)
public float getCreation()
public void setTime(int i, int time)
public void enqueue(Proc newProcess)
public void dequeue()
public Proc dequeueLast()
public void rotate()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |