V - type of the resulting valuepublic class TrackableJobFuture<V> extends AbstractCompletableFuture<V> implements TrackableJob<V>, JobCompletableFuture<V>
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.| Constructor and Description |
|---|
TrackableJobFuture(String name,
String jobId,
JobTracker jobTracker,
NodeEngine nodeEngine,
Collator collator) |
| Modifier and Type | Method and Description |
|---|---|
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 returns null if the underlying job id is not available because the job is already
finished or has not yet been submitted.It 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) |
andThen, andThen, get, getResult, isDone, runAsynchronousclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandThen, andThenpublic TrackableJobFuture(String name, String jobId, JobTracker jobTracker, NodeEngine nodeEngine, Collator collator)
public void setResult(Object result)
setResult in class AbstractCompletableFuture<V>public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<V>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic JobTracker getJobTracker()
TrackableJobJobTrackergetJobTracker in interface TrackableJob<V>public String getName()
TrackableJobJobTrackergetName in interface TrackableJob<V>public String getJobId()
TrackableJobgetJobId 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 returns null if the underlying job id is not available because the job is already
finished or has not yet been submitted.getJobProcessInformation in interface TrackableJob<V>Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.