public class Status
extends java.lang.Object
Constructor and Description |
---|
Status()
Status(): Constructor without parameters.
|
Status(java.util.Date date,
int numProcessors)
Status(): Constructor with parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addProcessorList(Processor proc)
addProcessorList: add a processor to the processor list.
|
java.util.Date |
getDate()
getDate: return the date of the status.
|
int |
getNumProcessors()
getNumProcessors: return the number of processors in the status system.
|
Processor |
getProcessor(int pos)
getProcessor: return the processor in the given position in the ArrayList of processors.
|
Processor |
getProcessor(java.lang.String name)
getProcessor: return the processor whose name matches the specified name.
|
java.util.ArrayList<Processor> |
getProcessorList()
getProcessorList: return the array list with all the processors.
|
void |
incNumProcessors()
incNumProcessors: increments the number of processors in the status system.
|
void |
setDate(java.util.Date date)
setDate: set the date of the status.
|
void |
setNumProcessors(int numProcessors)
setNumProcessors: set the number of processors in the status system.
|
void |
setProcessorList(java.util.ArrayList<Processor> ProcessorList)
setProcessorList: set the array list with all the processors.
|
java.lang.String |
toString()
toString
|
void |
updateProcessorList(Processor proc,
int pos)
updateProcessorList: update the processor in specified position
|
void |
updateStatusTime()
updateStatusTime: update the date and time.
|
public Status()
public Status(java.util.Date date, int numProcessors)
date
- Timestamp of the creation.numProcessors
- Number of processor on this status object.public void updateStatusTime()
public java.util.Date getDate()
public void setDate(java.util.Date date)
date
- the date to setpublic int getNumProcessors()
public void setNumProcessors(int numProcessors)
numProcessors
- the numProcessors to setpublic void incNumProcessors()
public java.util.ArrayList<Processor> getProcessorList()
public void setProcessorList(java.util.ArrayList<Processor> ProcessorList)
ProcessorList
- the ProcessorList to setpublic void addProcessorList(Processor proc)
proc
- Processor object to add to the processor list.public void updateProcessorList(Processor proc, int pos)
proc
- Processor object to update to the processor list.pos
- Position in the processor list to update.public Processor getProcessor(java.lang.String name)
name:
- name of the processor to search.public Processor getProcessor(int pos)
pos:
- position of the processor to get.public java.lang.String toString()
toString
in class java.lang.Object