Top Description Fields Constructors Methods
org.terracotta.statistics

public Class AbstractSourceStatistic<T extends org.terracotta.statistics.observer.ChainedObserver>

extends Object
implements SourceStatistic<T extends ChainedObserver>
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.SourceStatistic
Known Direct Subclasses
org.terracotta.statistics.derived.OperationResultFilter, org.terracotta.statistics.AbstractOperationStatistic
Imports
org.terracotta.statistics.observer.ChainedObserver, java.util.Collection, .Collections, java.util.concurrent.CopyOnWriteArrayList

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

Modifier and TypeField and Description
protected final Collection<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addDerivedStatistic(T
statistic to be registered
derived
)

Implements org.terracotta.statistics.SourceStatistic.addDerivedStatistic.

Register the given Observer to be called by this SourceStatistic
public Collection<T>
public void
removeDerivedStatistic(T
statistic to be removed
derived
)

Implements org.terracotta.statistics.SourceStatistic.removeDerivedStatistic.

Remove the given registered Observer from this SourceStatistic.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

derivedStatisticsback to summary
protected final Collection<T> derivedStatistics

Constructor Detail

AbstractSourceStatisticback to summary
public AbstractSourceStatistic()

Method Detail

addDerivedStatisticback to summary
public void addDerivedStatistic(T derived)

Implements org.terracotta.statistics.SourceStatistic.addDerivedStatistic.

Doc from org.terracotta.statistics.SourceStatistic.addDerivedStatistic.

Register the given Observer to be called by this SourceStatistic

Parameters
derived:T

statistic to be registered

Annotations
@Override
getDerivedStatisticsback to summary
public Collection<T> getDerivedStatistics()

Implements org.terracotta.statistics.SourceStatistic.getDerivedStatistics.

Doc from org.terracotta.statistics.SourceStatistic.getDerivedStatistics.

Retrieve all registered statistics.

Returns:Collection<T>

an unmodifiable collection of all derived statistics

removeDerivedStatisticback to summary
public void removeDerivedStatistic(T derived)

Implements org.terracotta.statistics.SourceStatistic.removeDerivedStatistic.

Doc from org.terracotta.statistics.SourceStatistic.removeDerivedStatistic.

Remove the given registered Observer from this SourceStatistic.

Parameters
derived:T

statistic to be removed

Annotations
@Override