Modifier and Type | Field and Description |
---|---|
long |
started |
Constructor and Description |
---|
JobHandler(JobImpl job,
JobExecutor consumer,
JobManagerConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
addToRetryList() |
boolean |
equals(Object obj) |
void |
finished(Job.JobState state,
boolean keepJobInHistory,
Long duration)
Finish a job.
|
JobExecutor |
getConsumer() |
JobImpl |
getJob() |
int |
hashCode() |
boolean |
isStopped() |
boolean |
persistJobProperties(String... propNames)
Update the property of a job in the resource tree
|
void |
reassign()
Reassign to a new instance.
|
boolean |
removeFromRetryList() |
boolean |
reschedule()
Reschedule the job
Update the retry count and remove the started time.
|
boolean |
startProcessing(Queue queue) |
void |
stop() |
String |
toString() |
public JobHandler(JobImpl job, JobExecutor consumer, JobManagerConfiguration configuration)
public JobImpl getJob()
public JobExecutor getConsumer()
public boolean startProcessing(Queue queue)
public boolean reschedule()
true
if rescheduling was successful, false
otherwise.public void finished(Job.JobState state, boolean keepJobInHistory, Long duration)
state
- The state of the processingkeepJobInHistory
- whether to keep the job in the job history.duration
- the duration of the processing.public void reassign()
public boolean persistJobProperties(String... propNames)
propNames
- the property names to updatetrue
if the update was successful.public boolean isStopped()
public void stop()
public void addToRetryList()
public boolean removeFromRetryList()
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.