Package org.terracotta.statistics
Class GeneralOperationStatistic<T extends Enum<T>>
java.lang.Object
org.terracotta.statistics.AbstractSourceStatistic<ChainedOperationObserver<? super T>>
org.terracotta.statistics.AbstractOperationStatistic<T>
org.terracotta.statistics.GeneralOperationStatistic<T>
- Type Parameters:
T- the operation result enum type
- All Implemented Interfaces:
OperationObserver<T>,OperationStatistic<T>,SourceStatistic<ChainedOperationObserver<? super T>>
class GeneralOperationStatistic<T extends Enum<T>>
extends AbstractOperationStatistic<T>
implements OperationStatistic<T>
An operation observer that tracks operation result counts and can drive further derived statistics.
AbstractOperationStatistic.begin() and end(Enum) must be called from the same thread so that latency can be computed.
-
Field Summary
FieldsFields inherited from class org.terracotta.statistics.AbstractOperationStatistic
name, properties, tags, typeFields inherited from class org.terracotta.statistics.AbstractSourceStatistic
derivedStatistics -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturn the count of operations with the given type.voidCalled immediately after the operation completes with no interesting parameters, and with the same thread the called {OperationObserver.begin()} before.longtoString()Methods inherited from class org.terracotta.statistics.AbstractOperationStatistic
begin, sum, typeMethods inherited from class org.terracotta.statistics.AbstractSourceStatistic
addDerivedStatistic, getDerivedStatistics, removeDerivedStatisticMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.terracotta.statistics.observer.OperationObserver
beginMethods inherited from interface org.terracotta.statistics.OperationStatistic
statistic, statistic, sum, typeMethods inherited from interface org.terracotta.statistics.SourceStatistic
addDerivedStatistic, getDerivedStatistics, removeDerivedStatistic
-
Field Details
-
counts
-
-
Constructor Details
-
Method Details
-
count
Return the count of operations with the given type.- Specified by:
countin interfaceOperationStatistic<T extends Enum<T>>- Parameters:
type- the result type- Returns:
- the operation count
-
sum
- Specified by:
sumin interfaceOperationStatistic<T extends Enum<T>>
-
end
Description copied from interface:OperationObserverCalled immediately after the operation completes with no interesting parameters, and with the same thread the called {OperationObserver.begin()} before.- Specified by:
endin interfaceOperationObserver<T extends Enum<T>>- Overrides:
endin classAbstractOperationStatistic<T extends Enum<T>>- Parameters:
result- the operation result
-
toString
-