| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.basher.impl.AbstractCollector
public abstract class AbstractCollector
| Field Summary | |
|---|---|
protected  org.apache.commons.logging.Log | 
_log
 | 
protected  TimeSource | 
_timeSource
 | 
| Constructor Summary | |
|---|---|
AbstractCollector()
 | 
|
| Method Summary | |
|---|---|
 void | 
basherEvent(BasherEvent basherEvent)
 | 
protected abstract  void | 
closeOpenResources()
 | 
 void | 
fail(TaskExecutionContext taskExecutionContext,
     long elapsedTime,
     long elapsedTimeNanos,
     Throwable throwable)
Reports a task's failure to run together with the time time elapsed for the failure.  | 
 List<Average> | 
getAverages()
Retrieves the list of averages calculated over time.  | 
 long | 
getFailures()
Retrieves the total number of failures recorded.  | 
 long | 
getNotRun()
Retrieves the total number of tasks that didn't wish to run  | 
 long | 
getSuccesses()
Retrieves the total number of successes recorded.  | 
 long | 
getTotal()
Retrieves the total number of tasks that were recorded (essentially successes+failures).  | 
protected abstract  void | 
initializeCollector(BasherContext basherContext)
 | 
 boolean | 
isCollecting()
Checks if the collector is currently collecting statistics.  | 
 Average | 
markAverage()
Informs the collector that a collection period has finished.  | 
 void | 
notRun(TaskExecutionContext taskExecutionContext,
       long elapsedTime,
       long elapsedTimeNanos)
Reports a task's wish to not run altogether with the time time elapsed for it to determine this.  | 
 void | 
registryDidShutdown()
 | 
 void | 
setLog(org.apache.commons.logging.Log log)
 | 
 void | 
setTimeSource(TimeSource timeSource)
 | 
 void | 
startCollecting()
Signals to the collector that statistics collection should start.  | 
 void | 
stopCollecting()
Signals to the collector that collection should stop.  | 
 void | 
success(TaskExecutionContext taskExecutionContext,
        long elapsedTime,
        long elapsedTimeNanos)
Reports a task's successful invocation together with the time elapsed for the task to run.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected TimeSource _timeSource
protected org.apache.commons.logging.Log _log
| Constructor Detail | 
|---|
public AbstractCollector()
| Method Detail | 
|---|
public void startCollecting()
Collector
startCollecting in interface Collectorpublic void stopCollecting()
Collector
stopCollecting in interface Collector
protected abstract void initializeCollector(BasherContext basherContext)
                                     throws Exception
Exceptionprotected abstract void closeOpenResources()
public void success(TaskExecutionContext taskExecutionContext,
                    long elapsedTime,
                    long elapsedTimeNanos)
Collector
success in interface CollectortaskExecutionContext - The task execution context wrapping the Task that was invokedelapsedTime - The time it took for the task to run
public void notRun(TaskExecutionContext taskExecutionContext,
                   long elapsedTime,
                   long elapsedTimeNanos)
Collector
notRun in interface CollectortaskExecutionContext - The task execution context wrapping the Task that didn't wish to runelapsedTime - The time it took for the task to run and determine it didn't want to run
public void fail(TaskExecutionContext taskExecutionContext,
                 long elapsedTime,
                 long elapsedTimeNanos,
                 Throwable throwable)
Collector
fail in interface CollectortaskExecutionContext - The task execution context wrapping the Task that failedelapsedTime - The time it took for the task to run and fail.throwable - The cause of the failure.  This may be null if the cause of the failure is not an exception.public long getFailures()
Collector
getFailures in interface Collectorpublic long getSuccesses()
Collector
getSuccesses in interface Collectorpublic long getNotRun()
Collector
getNotRun in interface Collectorpublic long getTotal()
Collector
getTotal in interface Collectorpublic List<Average> getAverages()
Collector
getAverages in interface CollectorAverage instances.public Average markAverage()
Collector
markAverage in interface Collectorpublic void setTimeSource(TimeSource timeSource)
public void setLog(org.apache.commons.logging.Log log)
public boolean isCollecting()
Collector
isCollecting in interface Collectorpublic void basherEvent(BasherEvent basherEvent)
basherEvent in interface BasherEventListenerpublic void registryDidShutdown()
registryDidShutdown in interface org.ops4j.gaderian.events.RegistryShutdownListener
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||