Package 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,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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDerivedStatistic(T derived) Register the givenObserverto be called by thisSourceStatisticRetrieve all registered statistics.voidremoveDerivedStatistic(T derived) Remove the given registeredObserverfrom thisSourceStatistic.
-
Field Details
-
derivedStatistics
-
-
Constructor Details
-
AbstractSourceStatistic
public AbstractSourceStatistic()
-
-
Method Details
-
addDerivedStatistic
Description copied from interface:SourceStatisticRegister the givenObserverto be called by thisSourceStatistic- Specified by:
addDerivedStatisticin interfaceSourceStatistic<T extends ChainedObserver>- Parameters:
derived- statistic to be registered
-
removeDerivedStatistic
Description copied from interface:SourceStatisticRemove the given registeredObserverfrom thisSourceStatistic.- Specified by:
removeDerivedStatisticin interfaceSourceStatistic<T extends ChainedObserver>- Parameters:
derived- statistic to be removed
-
getDerivedStatistics
Description copied from interface:SourceStatisticRetrieve all registered statistics.- Specified by:
getDerivedStatisticsin interfaceSourceStatistic<T extends ChainedObserver>- Returns:
- an unmodifiable collection of all derived statistics
-