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
|
Processor |
getProcessor(java.lang.String name)
getProcessor: return the processor whose name matches the specified
|
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
- of the statusnumProcessors
- number of logic servers in the systempublic 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 to addpublic void updateProcessorList(Processor proc, int pos)
proc
- processor to updatepos
- position to updatepublic Processor getProcessor(java.lang.String name)
name
- of the processor to searchpublic Processor getProcessor(int pos)
pos
- position to get the processorpublic java.lang.String toString()
toString
in class java.lang.Object