org.terracotta.statistics
Class AbstractSourceStatistic<T extends ChainedObserver>
java.lang.Object
org.terracotta.statistics.AbstractSourceStatistic<T>
- All Implemented Interfaces:
- SourceStatistic<T>
- Direct Known Subclasses:
- AbstractOperationStatistic, LatencySampling, OperationResultFilter
public class AbstractSourceStatistic<T extends ChainedObserver>
- extends Object
- implements SourceStatistic<T>
An abstract SourceStatistic that handles derived statistic
(de)registration.
This implementation exposes the currently registered statistics via the
derivedStatistics collection. Concrete implementations of this class should
fire on the contents of this to update the derived statistics.
|
Method Summary |
void |
addDerivedStatistic(T derived)
Register the given Observer to be called by this SourceStatistic |
void |
removeDerivedStatistic(T derived)
Remove the given registered Observer from this SourceStatistic. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
derivedStatistics
protected final Collection<T extends ChainedObserver> derivedStatistics
AbstractSourceStatistic
public AbstractSourceStatistic()
addDerivedStatistic
public void addDerivedStatistic(T derived)
- Description copied from interface:
SourceStatistic
- Register the given
Observer to be called by this SourceStatistic
- Specified by:
addDerivedStatistic in interface SourceStatistic<T extends ChainedObserver>
- Parameters:
derived - statistic to be registered
removeDerivedStatistic
public void removeDerivedStatistic(T derived)
- Description copied from interface:
SourceStatistic
- Remove the given registered
Observer from this SourceStatistic.
- Specified by:
removeDerivedStatistic in interface SourceStatistic<T extends ChainedObserver>
- Parameters:
derived - statistic to be removed
Copyright © 2016. All rights reserved.