Top Description Fields Constructors Methods
org.terracotta.statistics

public Class ZeroOperationStatistic<T extends java.lang.Enum<T>>

extends Object
implements OperationStatistic<T extends Enum<T>>
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.OperationStatistic, org.terracotta.statistics.SourceStatistic, org.terracotta.statistics.observer.OperationObserver
Imports
org.terracotta.statistics.observer.ChainedOperationObserver, java.util.Collection, .Collections, .Set

An operation statistic that always return 0 for everything. Used as a null object.

Field Summary

Modifier and TypeField and Description
private static final OperationStatistic<?>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addDerivedStatistic(ChainedOperationObserver<? super T>
statistic to be registered
derived
)

Implements org.terracotta.statistics.SourceStatistic.addDerivedStatistic.

Register the given Observer to be called by this SourceStatistic
public void
begin()

Implements org.terracotta.statistics.observer.OperationObserver.begin.

Called immediately prior to the operation beginning.
public long
count(T
the result type
type
)

Implements org.terracotta.statistics.OperationStatistic.count.

Return the count of operations with the given type.
public void
end(T
the operation result
result
)

Implements org.terracotta.statistics.observer.OperationObserver.end.

Called immediately after the operation completes with no interesting parameters, and with the same thread the called {begin()} before.
public static <T extends Enum<T>> OperationStatistic<T>
get()

public Collection<ChainedOperationObserver<? super T>>
public void
removeDerivedStatistic(ChainedOperationObserver<? super T>
statistic to be removed
derived
)

Implements org.terracotta.statistics.SourceStatistic.removeDerivedStatistic.

Remove the given registered Observer from this SourceStatistic.
public long
public long
public Class<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final OperationStatistic<?> INSTANCE

Constructor Detail

ZeroOperationStatisticback to summary
public ZeroOperationStatistic()

Method Detail

addDerivedStatisticback to summary
public void addDerivedStatistic(ChainedOperationObserver<? super 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:ChainedOperationObserver<? super T>

statistic to be registered

Annotations
@Override
beginback to summary
public void begin()

Implements org.terracotta.statistics.observer.OperationObserver.begin.

Doc from org.terracotta.statistics.observer.OperationObserver.begin.

Called immediately prior to the operation beginning.

Annotations
@Override
countback to summary
public long count(T type)

Implements org.terracotta.statistics.OperationStatistic.count.

Doc from org.terracotta.statistics.OperationStatistic.count.

Return the count of operations with the given type.

Parameters
type:T

the result type

Returns:long

the operation count

Annotations
@Override
endback to summary
public void end(T result)

Implements org.terracotta.statistics.observer.OperationObserver.end.

Doc from org.terracotta.statistics.observer.OperationObserver.end.

Called immediately after the operation completes with no interesting parameters, and with the same thread the called {begin()} before.

Parameters
result:T

the operation result

Annotations
@Override
getback to summary
public static <T extends Enum<T>> OperationStatistic<T> get()
Annotations
@SuppressWarnings:unchecked
getDerivedStatisticsback to summary
public Collection<ChainedOperationObserver<? super T>> getDerivedStatistics()

Implements org.terracotta.statistics.SourceStatistic.getDerivedStatistics.

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

Retrieve all registered statistics.

Returns:Collection<ChainedOperationObserver<? super T>>

an unmodifiable collection of all derived statistics

Annotations
@Override
removeDerivedStatisticback to summary
public void removeDerivedStatistic(ChainedOperationObserver<? super 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:ChainedOperationObserver<? super T>

statistic to be removed

Annotations
@Override
sumback to summary
public long sum(Set<T> types)

Implements org.terracotta.statistics.OperationStatistic.sum.

Annotations
@Override
sumback to summary
public long sum()

Implements org.terracotta.statistics.OperationStatistic.sum.

Annotations
@Override
typeback to summary
public Class<T> type()

Implements org.terracotta.statistics.OperationStatistic.type.

Annotations
@Override