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

# Class BaseStatisticsImpl

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

Direct Known Subclasses:
  `StatisticsImpl`, `TopicStatisticsImpl`

public abstract class BaseStatisticsImpl extends Object
Base class for statistics implementations

## Constructor Summary

Constructors
Constructor
Description
`BaseStatisticsImpl()`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(BaseStatisticsImpl 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`
`copyFrom(BaseStatisticsImpl other)`
Create a new statistics object with exactly the same values.
`void`
`failedJob()`
Add a failed job.
`void`
`finishedJob(long jobTime)`
Add a finished job
`long`
`getAverageProcessingTime()`
`long`
`getAverageWaitingTime()`
`long`
`getLastActivatedJobTime()`
`long`
`getLastFinishedJobTime()`
`long`
`getNumberOfCancelledJobs()`
`long`
`getNumberOfFailedJobs()`
`long`
`getNumberOfFinishedJobs()`
`long`
`getNumberOfProcessedJobs()`
`void`
`reset()`

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

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

## Constructor Details

### BaseStatisticsImpl

public BaseStatisticsImpl()

## Method Details

### getNumberOfProcessedJobs

public long getNumberOfProcessedJobs()

See Also:
  - `Statistics.getNumberOfProcessedJobs()`

### getAverageWaitingTime

public long getAverageWaitingTime()

See Also:
  - `Statistics.getAverageWaitingTime()`

### getAverageProcessingTime

public long getAverageProcessingTime()

See Also:
  - `Statistics.getAverageProcessingTime()`

### getNumberOfFinishedJobs

public long getNumberOfFinishedJobs()

See Also:
  - `Statistics.getNumberOfFinishedJobs()`

### getNumberOfCancelledJobs

public long getNumberOfCancelledJobs()

See Also:
  - `Statistics.getNumberOfCancelledJobs()`

### getNumberOfFailedJobs

public long getNumberOfFailedJobs()

See Also:
  - `Statistics.getNumberOfFailedJobs()`

### getLastActivatedJobTime

public long getLastActivatedJobTime()

See Also:
  - `Statistics.getLastActivatedJobTime()`

### getLastFinishedJobTime

public long getLastFinishedJobTime()

See Also:
  - `Statistics.getLastFinishedJobTime()`

### finishedJob

public void finishedJob(long jobTime)
Add a finished job

Parameters:
  `jobTime` - The processing time for this job.

### addActive

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

Parameters:
  `queueTime` - The time the job stayed in the queue.

### failedJob

public void failedJob()
Add a failed job.

### cancelledJob

public void cancelledJob()
Add a cancelled job.

### add

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

### copyFrom

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

### reset

public void reset()

See Also:
  - `Statistics.reset()`