public interface Job
DAG
or Pipeline
.
Once submitted, Jet starts executing the job automatically.Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Attempts to cancel execution of this job.
|
JobConfig |
getConfig()
Returns the configuration this job was submitted with.
|
CompletableFuture<Void> |
getFuture()
Gets the future associated with the job.
|
long |
getId()
Returns the ID of this job.
|
default String |
getName()
Returns the name of this job or
null if no name was supplied. |
JobStatus |
getStatus()
Returns the current status of this job.
|
long |
getSubmissionTime()
Returns the time when the job was submitted to the cluster.
|
default void |
join()
Waits for the job to complete and throws exception if job is completed
with an error.
|
boolean |
restart()
Cancels the current execution if the job is currently running and
schedules a new execution with the current member list of the Jet cluster
|
long getId()
IllegalStateException
- if the job has not started yet, and thus has no id.@Nonnull JobConfig getConfig()
@Nullable default String getName()
null
if no name was supplied.
Jobs can be named through JobConfig.setName(String)
prior to submission.
long getSubmissionTime()
The time is assigned by reading System.currentTimeMillis()
of
the master member that executes the job for the first time. It doesn't
change on restart.
@Nonnull CompletableFuture<Void> getFuture()
cancel()
method
should be used.IllegalStateException
- if the job has not started yet.boolean cancel()
job.getFuture().cancel()
fails
with an exception.default void join()
job.getFuture().get()
boolean restart()
IllegalStateException
- if the job has been already completedCopyright © 2018 Hazelcast, Inc.. All rights reserved.