|
GridGain 2.0.3
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
R - Type of the task result returning from GridTask.reduce(java.util.List) method.@Apache20LicenseCompatible public interface GridTaskFuture<R>
This class defines a handler for asynchronous task execution. It's similar in design
to standard JDK Future interface. Instance of this interface is returned from
the following methods:
Grid.execute(String, Object)Grid.execute(String, Object, long)Grid.execute(String, Object, long, GridTaskListener)Grid.execute(String, Object, GridTaskListener)

Documentation
Email Support
Online Forums
Issue Tracking
Author: 2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.0.3

| Method Summary | |
|---|---|
void |
cancel()
Cancels this task. |
R |
get()
Synchronously waits for task completion and returns task computation result. |
R |
get(long timeout)
Synchronously waits if necessary for at most the given time for task completion and returns task computation result. |
GridTaskSession |
getTaskSession()
Gets task session of execution grid task. |
boolean |
isCancelled()
Returns true if this task was cancelled before it completed normally. |
boolean |
isDone()
Checks if task is finished. |
| Method Detail |
|---|
GridTaskSession getTaskSession()
R get()
throws GridTaskTimeoutException,
GridException
GridTaskTimeoutException - If task execution has timed out. Note that physically
task may still be executing, as there is no practical way to stop it (however,
every job within task will receive interrupt call).
GridException - If task execution resulted in exception.
R get(long timeout)
throws GridTaskTimeoutException,
GridException
GridTaskTimeoutException - If task execution has timed out. Note that physically
task may still be executing, as there is no practical way to stop it (however,
every job within task will receive interrupt call).
GridException - If task execution resulted in exception.timeout - The maximum timeout in milliseconds.
void cancel()
throws GridException
Note, that there is no guarantee that a task will be cancelled after invoking this method.
Implementation will attempt to cancel all jobs spawned by this task by calling GridJob.cancel(),
but it is up to the actual GridJob implementation to react on it and cancel
the execution. There is also no guarantee that every job spawned by the task will get the
cancellation request, especially if a job was traveling on the network at the time the cancel
request was issued.
GridException - If task cancellation request was not successfully sent to all
participating nodes.boolean isDone()
boolean isCancelled()
|
GridGain 2.0.3
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Grid Computing Made Simple, ver. 2.0.3.20052008
2005-2008 Copyright © GridGain Systems. All Rights Reserved. |
|