public class JobInfoCallable<T> extends java.lang.Object implements java.util.concurrent.Callable<T>, JobInfo
| Constructor and Description |
|---|
JobInfoCallable(QueueNotifier queueNotifier,
Statistic statistic,
Job<T> delegate,
Callback<T> callback,
java.lang.String description)
Creates the job info callable.
|
| Modifier and Type | Method and Description |
|---|---|
T |
call()
Executes the job.
|
java.lang.String |
getDescription()
Gets the job description
|
long |
getEndTime()
Gets the completion time.
|
long |
getEnlistmentTime()
Gets the submission time of the job.
|
long |
getExecutionDuration()
Computes the time spent to execute the job (this does not include the waiting).
|
java.lang.String |
getJobType()
Gets the job's type identifier.
|
long |
getStartTime()
Gets the starting time.
|
long |
getWaitDuration()
Computes the time spent in the waiting queue
|
public JobInfoCallable(QueueNotifier queueNotifier, Statistic statistic, Job<T> delegate, Callback<T> callback, java.lang.String description)
queueNotifier - notifier for QueueListenersstatistic - the statistics that will be populateddelegate - the real jobcallback - the callback notified when the job is completeddescription - the job descriptionpublic T call() throws java.lang.Exception
call in interface java.util.concurrent.Callable<T>java.lang.Exception - the job execution failedpublic long getEnlistmentTime()
JobInfogetEnlistmentTime in interface JobInfopublic long getStartTime()
JobInfogetStartTime in interface JobInfopublic long getEndTime()
JobInfogetEndTime in interface JobInfopublic long getWaitDuration()
getWaitDuration in interface JobInfopublic long getExecutionDuration()
getExecutionDuration in interface JobInfopublic java.lang.String getDescription()
JobInfogetDescription in interface JobInfopublic java.lang.String getJobType()
JobInfonull if not provided.getJobType in interface JobInfoCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.