|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.spi.impl.AbstractCompletableFuture<V>
com.hazelcast.mapreduce.impl.task.TrackableJobFuture<V>
V - type of the resulting valuepublic class TrackableJobFuture<V>
This is the node based implementation of the job's reactive ICompletableFuture
and is returned to the users codebase. It hides the exposed JobPartitionState array from
JobProcessInformationImpl by wrapping it into an adapter
that creates a full copy prior to returning it to the end user.
| Field Summary |
|---|
| Fields inherited from class com.hazelcast.spi.impl.AbstractCompletableFuture |
|---|
nodeEngine, NULL_VALUE, result, resultUpdater |
| Constructor Summary | |
|---|---|
TrackableJobFuture(String name,
String jobId,
JobTracker jobTracker,
NodeEngine nodeEngine,
Collator collator)
|
|
| Method Summary | |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
V |
get(long timeout,
TimeUnit unit)
|
ICompletableFuture<V> |
getCompletableFuture()
Returns the ICompletableFuture to add callbacks
or wait for the resulting value of the tracked job |
String |
getJobId()
Returns the unique job id of the tracked job |
JobProcessInformation |
getJobProcessInformation()
Returns an instance of JobProcessInformation to find out the state and
statistics of a running task or null if the underlying job id is not available because job is already
finished or not yet submitted.It even returns null if not requested on the job issuing cluster member or client since those values are not distributed to all clusters for traffic reasons. |
JobTracker |
getJobTracker()
Returns the assigned JobTracker |
String |
getName()
Returns the name of the underlying JobTracker |
boolean |
isCancelled()
|
void |
setResult(Object result)
|
| Methods inherited from class com.hazelcast.spi.impl.AbstractCompletableFuture |
|---|
andThen, andThen, fireCallbacks, get, getAsyncExecutor, getResult, isDone |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.hazelcast.core.ICompletableFuture |
|---|
andThen, andThen |
| Methods inherited from interface java.util.concurrent.Future |
|---|
get, isDone |
| Constructor Detail |
|---|
public TrackableJobFuture(String name,
String jobId,
JobTracker jobTracker,
NodeEngine nodeEngine,
Collator collator)
| Method Detail |
|---|
public void setResult(Object result)
setResult in class AbstractCompletableFuture<V>public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface Future<V>public boolean isCancelled()
isCancelled in interface Future<V>
public V get(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
get in interface Future<V>InterruptedException
ExecutionException
TimeoutExceptionpublic JobTracker getJobTracker()
TrackableJobJobTracker
getJobTracker in interface TrackableJob<V>public String getName()
TrackableJobJobTracker
getName in interface TrackableJob<V>public String getJobId()
TrackableJob
getJobId in interface JobCompletableFuture<V>getJobId in interface TrackableJob<V>public ICompletableFuture<V> getCompletableFuture()
TrackableJobICompletableFuture to add callbacks
or wait for the resulting value of the tracked job
getCompletableFuture in interface TrackableJob<V>public JobProcessInformation getJobProcessInformation()
TrackableJobJobProcessInformation to find out the state and
statistics of a running task or null if the underlying job id is not available because job is already
finished or not yet submitted.
getJobProcessInformation in interface TrackableJob<V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||