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()
JobInfo
getEnlistmentTime
in interface JobInfo
public long getStartTime()
JobInfo
getStartTime
in interface JobInfo
public long getEndTime()
JobInfo
getEndTime
in interface JobInfo
public long getWaitDuration()
getWaitDuration
in interface JobInfo
public long getExecutionDuration()
getExecutionDuration
in interface JobInfo
public java.lang.String getDescription()
JobInfo
getDescription
in interface JobInfo
public java.lang.String getJobType()
JobInfo
null
if not provided.getJobType
in interface JobInfo
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.