public class ZeroOperationStatistic<T extends java.lang.Enum<T>> extends java.lang.Object implements OperationStatistic<T>
Constructor and Description |
---|
ZeroOperationStatistic() |
Modifier and Type | Method and Description |
---|---|
void |
addDerivedStatistic(ChainedOperationObserver<? super T> derived)
Register the given
Observer to be called by this SourceStatistic |
void |
begin()
Called immediately prior to the operation beginning.
|
long |
count(T type)
Return the count of operations with the given type.
|
void |
end(T result)
Called immediately after the operation completes with no interesting parameters, and with the same thread the called {
OperationObserver.begin() } before. |
static <T extends java.lang.Enum<T>> |
get() |
java.util.Collection<ChainedOperationObserver<? super T>> |
getDerivedStatistics()
Retrieve all registered statistics.
|
void |
removeDerivedStatistic(ChainedOperationObserver<? super T> derived)
Remove the given registered
Observer from this SourceStatistic . |
long |
sum() |
long |
sum(java.util.Set<T> types) |
java.lang.Class<T> |
type() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
statistic, statistic
public static <T extends java.lang.Enum<T>> OperationStatistic<T> get()
public java.lang.Class<T> type()
type
in interface OperationStatistic<T extends java.lang.Enum<T>>
public long count(T type)
OperationStatistic
count
in interface OperationStatistic<T extends java.lang.Enum<T>>
type
- the result typepublic long sum(java.util.Set<T> types)
sum
in interface OperationStatistic<T extends java.lang.Enum<T>>
public long sum()
sum
in interface OperationStatistic<T extends java.lang.Enum<T>>
public void addDerivedStatistic(ChainedOperationObserver<? super T> derived)
SourceStatistic
Observer
to be called by this SourceStatistic
addDerivedStatistic
in interface SourceStatistic<ChainedOperationObserver<? super T extends java.lang.Enum<T>>>
derived
- statistic to be registeredpublic void removeDerivedStatistic(ChainedOperationObserver<? super T> derived)
SourceStatistic
Observer
from this SourceStatistic
.removeDerivedStatistic
in interface SourceStatistic<ChainedOperationObserver<? super T extends java.lang.Enum<T>>>
derived
- statistic to be removedpublic java.util.Collection<ChainedOperationObserver<? super T>> getDerivedStatistics()
SourceStatistic
getDerivedStatistics
in interface SourceStatistic<ChainedOperationObserver<? super T extends java.lang.Enum<T>>>
public void begin()
OperationObserver
begin
in interface OperationObserver<T extends java.lang.Enum<T>>
public void end(T result)
OperationObserver
OperationObserver.begin()
} before.end
in interface OperationObserver<T extends java.lang.Enum<T>>
result
- the operation result