public class CompletedJobFuture extends Object implements ScanJobFuture
| Constructor and Description |
|---|
CompletedJobFuture(ScanMetrics completedJobMetrics) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
ScanMetrics |
get() |
ScanMetrics |
get(long timeout,
TimeUnit unit) |
ScanMetrics |
getIntermediateResult()
Returns a set of potentially incomplete and still-changing metrics
for this job.
|
boolean |
isCancelled() |
boolean |
isDone() |
public CompletedJobFuture(ScanMetrics completedJobMetrics)
public ScanMetrics getIntermediateResult()
ScanJobFutureFuture.get(), nor will the metrics visible through
the object returned by this method necessarily eventually converge
on the same values in the object returned by Future.get(), though
the implementation should attempt to provide both properties when
practical.
The metrics visible through the object returned by this method may also change their values between reads. In other words, this is not necessarily an immutable snapshot.
If the job has failed and the implementation is capable of
quickly detecting that, then the implementation should throw an
ExecutionException. Returning metrics in case of failure is
acceptable, but throwing an exception is preferred.
getIntermediateResult in interface ScanJobFuturepublic boolean cancel(boolean mayInterruptIfRunning)
cancel in interface Future<ScanMetrics>public boolean isCancelled()
isCancelled in interface Future<ScanMetrics>public boolean isDone()
isDone in interface Future<ScanMetrics>public ScanMetrics get() throws InterruptedException, ExecutionException
get in interface Future<ScanMetrics>InterruptedExceptionExecutionExceptionpublic ScanMetrics get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<ScanMetrics>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2012–2023. All rights reserved.