public class EtiaoJob extends AbstractGraphJob implements JobContext
Job
interface.Job.Action, Job.Health, Job.State
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID_PREFIX
Prefix used by job unique identifiers.
|
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.
|
void |
completeClosing(long timeout,
java.util.concurrent.TimeUnit unit)
Complete job closing.
|
protected void |
completeTransition() |
java.lang.String |
getId()
Get the runtime identifier for the job containing this
Oplet . |
java.lang.String |
getName()
Get the name of the job containing this
Oplet . |
DirectGraph |
graph() |
void |
stateChange(Job.Action action)
Initiates an execution state change.
|
getCurrentState, getHealth, getLastError, getNextState, inTransition, setHealth, setLastError, setNextState
public static final java.lang.String ID_PREFIX
public java.lang.String getName()
Oplet
.
If a job name is not specified, this implementation
creates a job name with the following format: topologyName_jobId
.
getName
in interface Job
getName
in interface JobContext
public java.lang.String getId()
JobContext
Oplet
.getId
in interface Job
getId
in interface JobContext
public void stateChange(Job.Action action)
Job
stateChange
in interface Job
stateChange
in class AbstractGraphJob
action
- which triggers the state change.protected void completeTransition()
completeTransition
in class AbstractGraphJob
public void complete() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Job
public void complete(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException
Job
complete
in interface Job
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 outpublic void completeClosing(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException
timeout
- the time to waitunit
- TimeUnitjava.util.concurrent.ExecutionException
- if the job execution threw an ExecutionException.java.lang.InterruptedException
- if the job execution threw an InterruptedException.java.util.concurrent.TimeoutException
- if the job execution threw an TimeoutException.public DirectGraph graph()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641