public abstract class BaseStatisticManager extends java.lang.Object implements StatisticManager
Modifier and Type | Class and Description |
---|---|
protected class |
BaseStatisticManager.MaxCapacityList<E> |
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
Constructor and Description |
---|
BaseStatisticManager() |
BaseStatisticManager(int maxHistoryCount) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
close()
Closes the component.
|
InterceptorStatistic |
getLatestStat() |
int |
getMaxHistoryCount() |
java.util.List<InterceptorStatistic> |
getStats() |
void |
init()
Initialises the component.
|
void |
setMaxHistoryCount(int maxHistoryCount) |
void |
setStats(java.util.List<InterceptorStatistic> stats) |
void |
start()
Starts the component.
|
protected java.util.List<InterceptorStatistic> |
stats() |
void |
stop()
Stop the component
|
void |
updateCurrent(InterceptorStatistic currentTimeSlice) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
produce
public BaseStatisticManager()
public BaseStatisticManager(int maxHistoryCount)
public void setStats(java.util.List<InterceptorStatistic> stats)
public void clear()
clear
in interface StatisticManager
public void updateCurrent(InterceptorStatistic currentTimeSlice)
updateCurrent
in interface StatisticManager
public InterceptorStatistic getLatestStat()
getLatestStat
in interface StatisticManager
public java.util.List<InterceptorStatistic> getStats()
getStats
in interface StatisticManager
protected java.util.List<InterceptorStatistic> stats()
public int getMaxHistoryCount()
public void setMaxHistoryCount(int maxHistoryCount)
setMaxHistoryCount
in interface StatisticManager
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
init
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
spublic void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of AdaptrisMessageConsumer
, calling start
will begin message delivery.
start
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
spublic void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer
, calling stop
will pause message delivery. Throwing a RuntimeException
may cause unintended consequences
stop
in interface ComponentLifecycle
public void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException
may
cause unintended consequences
close
in interface ComponentLifecycle