public interface Job
| Modifier and Type | Method and Description |
|---|---|
default boolean |
cancel()
Attempts to cancel execution of this job.
|
default CompletableFuture<Void> |
execute()
Deprecated.
Use
getFuture() instead. This method will be removed in the next release. |
CompletableFuture<Void> |
getFuture()
Gets the future associated with the job, used to control the job.
|
long |
getJobId()
Returns the ID of this job.
|
JobStatus |
getJobStatus()
Returns the status of this job.
|
default void |
join()
Waits for the job to complete and throws exception if job is completed with an error.
|
long getJobId()
IllegalStateException - If the job was not started yet, and thus
has no job id.@Nonnull CompletableFuture<Void> getFuture()
IllegalStateException - If the job was not started yet.default boolean cancel()
Future.cancel(),
however the job might still be running on the cluster. You can query
the status via getJobStatus() to check for actual completion.
Shorthand for job.getFuture().cancel()default void join()
job.getFuture().get()@Deprecated default CompletableFuture<Void> execute()
getFuture() instead. This method will be removed in the next release.Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.