public class AbstractSourceStatistic<T extends ChainedObserver> extends Object implements SourceStatistic<T>
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.
| Modifier and Type | Field and Description |
|---|---|
protected Collection<T> |
derivedStatistics |
| Constructor and Description |
|---|
AbstractSourceStatistic() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDerivedStatistic(T derived)
Register the given
Observer to be called by this SourceStatistic |
Collection<T> |
getDerivedStatistics()
Retrieve all registered statistics.
|
void |
removeDerivedStatistic(T derived)
Remove the given registered
Observer from this SourceStatistic. |
protected final Collection<T extends ChainedObserver> derivedStatistics
public void addDerivedStatistic(T derived)
SourceStatisticObserver to be called by this SourceStatisticaddDerivedStatistic in interface SourceStatistic<T extends ChainedObserver>derived - statistic to be registeredpublic void removeDerivedStatistic(T derived)
SourceStatisticObserver from this SourceStatistic.removeDerivedStatistic in interface SourceStatistic<T extends ChainedObserver>derived - statistic to be removedpublic Collection<T> getDerivedStatistics()
SourceStatisticgetDerivedStatistics in interface SourceStatistic<T extends ChainedObserver>Copyright © 2018. All rights reserved.