Package org.apache.sling.event.jobs
Interface Statistics
-
- All Known Subinterfaces:
StatisticsMBean
@ProviderType public interface Statistics
Statistic information. This information is not preserved between restarts of the service. Once a service is restarted, the counters start at zero!- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getAverageProcessingTime()
The average processing time of a job - this only counts finished jobs.long
getAverageWaitingTime()
The average waiting time of a job in the queue.long
getLastActivatedJobTime()
The time a job has been started last.long
getLastFinishedJobTime()
The time a job has been finished/failed/cancelled last.long
getNumberOfActiveJobs()
Number of jobs currently in processing.long
getNumberOfCancelledJobs()
Number of permanently failing or cancelled jobs.long
getNumberOfFailedJobs()
Number of failing jobs.long
getNumberOfFinishedJobs()
Number of successfully finished jobs.long
getNumberOfJobs()
This just addsgetNumberOfActiveJobs()
andgetNumberOfQueuedJobs()
long
getNumberOfProcessedJobs()
Number of already processed jobs.long
getNumberOfQueuedJobs()
Number of jobs currently waiting in a queue.long
getStartTime()
The time this service has been startedvoid
reset()
Clear all collected statistics and set the starting time to the current time.
-
-
-
Method Detail
-
getStartTime
long getStartTime()
The time this service has been started- Returns:
- The time this service has been started
-
getNumberOfFinishedJobs
long getNumberOfFinishedJobs()
Number of successfully finished jobs.- Returns:
- Number of successfully finished jobs.
-
getNumberOfCancelledJobs
long getNumberOfCancelledJobs()
Number of permanently failing or cancelled jobs.- Returns:
- Number of permanently failing or cancelled jobs
-
getNumberOfFailedJobs
long getNumberOfFailedJobs()
Number of failing jobs.- Returns:
- Number of failing jobs.
-
getNumberOfProcessedJobs
long getNumberOfProcessedJobs()
Number of already processed jobs. This addsgetNumberOfFinishedJobs()
,getNumberOfCancelledJobs()
andgetNumberOfFailedJobs()
- Returns:
- Number of already processed jobs
-
getNumberOfActiveJobs
long getNumberOfActiveJobs()
Number of jobs currently in processing.- Returns:
- Number of jobs currently in processing.
-
getNumberOfQueuedJobs
long getNumberOfQueuedJobs()
Number of jobs currently waiting in a queue.- Returns:
- Number of jobs currently waiting in a queue.
-
getNumberOfJobs
long getNumberOfJobs()
This just addsgetNumberOfActiveJobs()
andgetNumberOfQueuedJobs()
- Returns:
- The number of jobs
-
getLastActivatedJobTime
long getLastActivatedJobTime()
The time a job has been started last.- Returns:
- The time a job has been started last.
-
getLastFinishedJobTime
long getLastFinishedJobTime()
The time a job has been finished/failed/cancelled last.- Returns:
- The time a job has been finished/failed/cancelled last.
-
getAverageWaitingTime
long getAverageWaitingTime()
The average waiting time of a job in the queue.- Returns:
- The average waiting time of a job in the queue.
-
getAverageProcessingTime
long getAverageProcessingTime()
The average processing time of a job - this only counts finished jobs.- Returns:
- The average processing time of a job
-
reset
void reset()
Clear all collected statistics and set the starting time to the current time. Note that not all fields are cleared, last waiting time or number of active and queued jobs is not cleared as these are currently used.
-
-