public interface Job
Current
- The current state of execution
when the job is not executing a state transition; the source state
while the job is making a state transition after the client code
calls stateChange(Job.Action)
.Next
- The destination state while the job
is making a state transition; same as the current state while
the job state is stable (that is, not making a transition).Modifier and Type | Interface and Description |
---|---|
static class |
Job.Action
Actions which trigger
Job.State transitions. |
static class |
Job.Health
Enumeration for the summarized health indicator of the graph nodes.
|
static class |
Job.State
States of a graph job.
|
Modifier and Type | Method and Description |
---|---|
void |
complete()
Waits for any outstanding job work to complete.
|
void |
complete(long timeout,
java.util.concurrent.TimeUnit unit)
Waits for at most the specified time for the job to complete.
|
Job.State |
getCurrentState()
Retrieves the current state of this job.
|
Job.Health |
getHealth()
Returns the summarized health indicator of the graph nodes.
|
java.lang.String |
getId()
Returns the identifier of this job.
|
java.lang.String |
getLastError()
Returns the last error message caught by the current job execution.
|
java.lang.String |
getName()
Returns the name of this job.
|
Job.State |
getNextState()
Retrieves the next execution state when this job makes a state
transition.
|
void |
stateChange(Job.Action action)
Initiates an execution state change.
|
Job.State getCurrentState()
Job.State getNextState()
getCurrentState()
.void stateChange(Job.Action action) throws java.lang.IllegalArgumentException
action
- which triggers the state change.java.lang.IllegalArgumentException
- if the job is not in an appropriate
state for the requested action, or the action is not supported.Job.Health getHealth()
java.lang.String getLastError()
java.lang.String getName()
java.lang.String getId()
void complete() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
- if the job execution threw an exception.java.lang.InterruptedException
- if the current thread was interrupted while waitingvoid complete(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException
timeout
- the time to waitunit
- the time unit of the timeout argumentjava.util.concurrent.ExecutionException
- if the job execution threw an exception.java.lang.InterruptedException
- if the current thread was interrupted while waitingjava.util.concurrent.TimeoutException
- if the wait timed outCopyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641