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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDerivedStatistic(T derived)Register the givenObserverto be called by thisSourceStatisticjava.util.Collection<T>getDerivedStatistics()Retrieve all registered statistics.voidremoveDerivedStatistic(T derived)Remove the given registeredObserverfrom thisSourceStatistic.
-
-
-
Method Detail
-
addDerivedStatistic
void addDerivedStatistic(T derived)
Register the givenObserverto be called by thisSourceStatistic- Parameters:
derived- statistic to be registered
-
removeDerivedStatistic
void removeDerivedStatistic(T derived)
Remove the given registeredObserverfrom thisSourceStatistic.- Parameters:
derived- statistic to be removed
-
getDerivedStatistics
java.util.Collection<T> getDerivedStatistics()
Retrieve all registered statistics.- Returns:
- an unmodifiable collection of all derived statistics
-
-