Package org.apache.sling.event.impl.jobs.stats

# Class StatisticsImpl

java.lang.Object
org.apache.sling.event.impl.jobs.stats.BaseStatisticsImpl
org.apache.sling.event.impl.jobs.stats.StatisticsImpl

All Implemented Interfaces:
  `org.apache.sling.event.jobs.Statistics`

public class StatisticsImpl extends BaseStatisticsImpl implements org.apache.sling.event.jobs.Statistics
Implementation of the statistics.

## Constructor Summary

Constructors
Constructor
Description
`StatisticsImpl()`
`StatisticsImpl(long startTime)`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(StatisticsImpl other)`
Add another statistics information.
`void`
`addActive(long queueTime)`
Add a job from the queue to status active
`void`
`cancelledJob()`
Add a cancelled job.
`void`
`clearQueued()`
Clear all queued
`void`
`copyFrom(StatisticsImpl other)`
Create a new statistics object with exactly the same values.
`void`
`decQueued()`
Job not processed by us
`void`
`failedJob()`
Add a failed job.
`void`
`finishedJob(long jobTime)`
Add a finished job
`long`
`getNumberOfActiveJobs()`
`long`
`getNumberOfJobs()`
`long`
`getNumberOfQueuedJobs()`
`long`
`getStartTime()`
`void`
`incQueued()`
New job in the queue
`void`
`reset()`

### Methods inherited from class org.apache.sling.event.impl.jobs.stats.BaseStatisticsImpl

`add, copyFrom, getAverageProcessingTime, getAverageWaitingTime, getLastActivatedJobTime, getLastFinishedJobTime, getNumberOfCancelledJobs, getNumberOfFailedJobs, getNumberOfFinishedJobs, getNumberOfProcessedJobs`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.sling.event.jobs.Statistics

`getAverageProcessingTime, getAverageWaitingTime, getLastActivatedJobTime, getLastFinishedJobTime, getNumberOfCancelledJobs, getNumberOfFailedJobs, getNumberOfFinishedJobs, getNumberOfProcessedJobs`

## Constructor Details

### StatisticsImpl

public StatisticsImpl()

### StatisticsImpl

public StatisticsImpl(long startTime)

## Method Details

### getStartTime

public long getStartTime()

Specified by:
  `getStartTime` in interface `org.apache.sling.event.jobs.Statistics`
See Also:
  - `Statistics.getStartTime()`

### getNumberOfActiveJobs

public long getNumberOfActiveJobs()

Specified by:
  `getNumberOfActiveJobs` in interface `org.apache.sling.event.jobs.Statistics`
See Also:
  - `Statistics.getNumberOfActiveJobs()`

### getNumberOfQueuedJobs

public long getNumberOfQueuedJobs()

Specified by:
  `getNumberOfQueuedJobs` in interface `org.apache.sling.event.jobs.Statistics`
See Also:
  - `Statistics.getNumberOfQueuedJobs()`

### getNumberOfJobs

public long getNumberOfJobs()

Specified by:
  `getNumberOfJobs` in interface `org.apache.sling.event.jobs.Statistics`
See Also:
  - `Statistics.getNumberOfJobs()`

### finishedJob

public void finishedJob(long jobTime)
Add a finished job

Overrides:
  `finishedJob` in class `BaseStatisticsImpl`
Parameters:
  `jobTime` - The processing time for this job.

### failedJob

public void failedJob()
Add a failed job.

Overrides:
  `failedJob` in class `BaseStatisticsImpl`

### cancelledJob

public void cancelledJob()
Add a cancelled job.

Overrides:
  `cancelledJob` in class `BaseStatisticsImpl`

### incQueued

public void incQueued()
New job in the queue

### decQueued

public void decQueued()
Job not processed by us

### clearQueued

public void clearQueued()
Clear all queued

### addActive

public void addActive(long queueTime)
Add a job from the queue to status active

Overrides:
  `addActive` in class `BaseStatisticsImpl`
Parameters:
  `queueTime` - The time the job stayed in the queue.

### add

public void add(StatisticsImpl other)
Add another statistics information.

### copyFrom

public void copyFrom(StatisticsImpl other)
Create a new statistics object with exactly the same values.

### reset

public void reset()

Specified by:
  `reset` in interface `org.apache.sling.event.jobs.Statistics`
Overrides:
  `reset` in class `BaseStatisticsImpl`
See Also:
  - `Statistics.reset()`