|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.ucsb.cs.jicos.services.Task
public abstract class Task
| Field Summary | |
|---|---|
static int |
ALL_INPUTS
|
| Constructor Summary | |
|---|---|
Task()
A no argument constructor is needed by RMI when unmarshalling arguments and/or return values. |
|
| Method Summary | |
|---|---|
void |
compute(Task task)
This is used to "dispatch" a subtask (its argument). |
abstract java.lang.Object |
execute(Environment environment)
This method implements the computation encapsulated by this task. |
java.lang.Object |
execute(Environment environment,
int inputIndex)
This method is used to process inputs as they arrive, instead of waiting until they all have arrived. |
boolean |
executeIncrementally(Environment environment)
If true, invoke execute( Environment environment, int inputIndex) as each input is received. |
boolean |
executeOnServer(Environment environment)
Invoke this task's execute method on the originating TaskServer if and only if this method evaluates to true. |
java.lang.Object |
getInput(int i)
Returns input[i]. |
edu.ucsb.cs.jicos.services.TaskId |
getTaskId()
get the TaskId of this Task. |
boolean |
isAtomic(Environment environment)
The host that is invoking this task's execute method will pre-fetch a task if and only if this method evaluates to true. |
int |
numInputs()
Returns the number of inputs to this computational task. |
int |
numUnsetInputs()
|
java.lang.String |
toString()
returns a String representation of the Task. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ALL_INPUTS
| Constructor Detail |
|---|
public Task()
| Method Detail |
|---|
public final void compute(Task task)
execute method's returned value.
task - A subtask of this task.
It has all its inputs, thus is ready for execution. Its successor is a Compose task.public abstract java.lang.Object execute(Environment environment)
environment - The task's environment: The computation's immutable input &
its Shared Object, if any.
Object is either the execute method's computed value
xor
a (compose) Task. In the latter case, the compose task takes the output from this
task's subtasks, and composes it to create this task's output.
This, at least, is the intent of this method's returned value.
public java.lang.Object execute(Environment environment,
int inputIndex)
environment - The task's environment: The computation's immutable input &
its Shared Object, if any.
Object is either the execute method's
computed value xor
a (compose) Task - which takes the output from this task's subtasks, and
composes it to create this task's output. This, at least, is the intent
of this method's returned value
xor a ContinueSignal> "Task" - which indicates that the task
is not complete, and is waiting for more inputs.public boolean executeOnServer(Environment environment)
environment - The Environment for this session.
public final java.lang.Object getInput(int i)
i - The index of the desired input array element.
public final int numUnsetInputs()
public final edu.ucsb.cs.jicos.services.TaskId getTaskId()
public boolean isAtomic(Environment environment)
environment - The session environment.
public boolean executeIncrementally(Environment environment)
public final int numInputs()
public java.lang.String toString()
Task.
toString in class java.lang.ObjectTask:
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||