|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcomputer.ComputerImpl
public class ComputerImpl
A "server" that accepts tasks from a remote user, and returns them
Constructor Summary | |
---|---|
ComputerImpl(Computer2Space stub)
|
Method Summary | |
---|---|
long |
getComputerTimeUp()
|
int |
getUniqueTaskID()
Requests from the Space a unique ID for the task. |
void |
hello()
|
static void |
main(java.lang.String[] args)
|
Result |
run(Task task)
Runs the task and returns its return value |
void |
setShared(Shared proposedShared)
Check the shared coming from the task if it is better than the current shared then pass it on to the space |
void |
spawn(Task task)
Passes the task back to the space in order for it to be scheduled. |
void |
updateShared(Shared proposedShared)
The Space is telling the Computer that there is an update to the shared value, check it and store it |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComputerImpl(Computer2Space stub)
Method Detail |
---|
public Result run(Task task) throws java.rmi.RemoteException
run
in interface Computer
java.rmi.RemoteException
public void updateShared(Shared proposedShared)
updateShared
in interface Computer
shared
- public void spawn(Task task)
spawn
in interface Computer
task
- The new task that is to be scheduled.public int getUniqueTaskID()
getUniqueTaskID
in interface Computer
public void setShared(Shared proposedShared)
setShared
in interface Computer
shared
- public long getComputerTimeUp()
getComputerTimeUp
in interface Computer
public void hello()
hello
in interface Computer
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |