Package org.terracotta.statistics
Interface SourceStatistic<T extends ChainedObserver>
- Type Parameters:
T- Supported derived observer type
- All Known Subinterfaces:
OperationStatistic<T>
- All Known Implementing Classes:
AbstractOperationStatistic,AbstractSourceStatistic,GeneralOperationStatistic,MappedOperationStatistic,OperationResultFilter,OperationResultSampler,StatisticMapper,ZeroOperationStatistic
public interface SourceStatistic<T extends ChainedObserver>
Source statistic implementations support derived statistics.
Derived statistics can be registered and will then receive the relevant observer calls to update their status.
-
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.
-
Method Details
-
addDerivedStatistic
Register the givenObserverto be called by thisSourceStatistic- Parameters:
derived- statistic to be registered
-
removeDerivedStatistic
Remove the given registeredObserverfrom thisSourceStatistic.- Parameters:
derived- statistic to be removed
-
getDerivedStatistics
Collection<T> getDerivedStatistics()Retrieve all registered statistics.- Returns:
- an unmodifiable collection of all derived statistics
-