|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcs290b.project.api.Task
public class Task
Default implementation of a divide and conquer task. The child tasks are used by the Computer to add input tasks during for later processing. Note: This class has a natural ordering that is inconsistent with equals.
Constructor Summary | |
---|---|
Task()
|
Method Summary | |
---|---|
int |
compareTo(Task task)
|
protected void |
compute(Task task)
Used to the execute method to mark child tasks for execution. |
java.lang.Object |
execute(java.lang.Object input)
Default impelementation of the execute method. |
boolean |
executeOnServer()
|
int |
getArgIndex()
The index where the Result of this task will be located |
java.util.ArrayList<Task> |
getChildTasks()
Child tasks added during execution. |
long |
getCriticalPath()
|
long |
getRunTime()
|
protected Shared |
getShared()
|
Computer2Server |
getSourceServer()
|
TaskId |
getSuccessorId()
|
TaskId |
getTaskId()
Return the associated TaskId |
protected void |
sendEvent(java.lang.Object event)
|
void |
setArgIndex(int value)
Set the index where the Result of this task will be located. |
void |
setCriticalPath(long cp)
|
void |
setRunTime(long time)
|
protected void |
setShared(Shared shared)
|
void |
setSourceServer(Computer2Server sourceServer)
|
void |
setSuccessorId(TaskId successorId)
|
void |
setSupport(SupportManager support)
|
void |
setTaskId(TaskId value)
Assign the associated TaskId. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Task()
Method Detail |
---|
public long getCriticalPath()
public void setCriticalPath(long cp)
public void setSupport(SupportManager support)
protected void setShared(Shared shared)
public void setSourceServer(Computer2Server sourceServer)
public Computer2Server getSourceServer()
protected Shared getShared()
protected void sendEvent(java.lang.Object event)
public boolean executeOnServer()
public int compareTo(Task task)
compareTo
in interface java.lang.Comparable<Task>
public void setSuccessorId(TaskId successorId)
public TaskId getSuccessorId()
public void setRunTime(long time)
public long getRunTime()
public void setArgIndex(int value)
value
- The index to set.public int getArgIndex()
public void setTaskId(TaskId value)
value
- The TaskId to set.public TaskId getTaskId()
public java.util.ArrayList<Task> getChildTasks()
protected void compute(Task task)
task
- The child task to execute.public java.lang.Object execute(java.lang.Object input)
input
- The shared input set by the client
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |