Top Fields Constructors Methods
org.terracotta.statistics

public abstract Class AbstractOperationStatistic<T extends java.lang.Enum<T>>

extends AbstractSourceStatistic<ChainedOperationObserver<? super T extends Enum<T>>>
implements OperationStatistic<T extends Enum<T>>
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.OperationStatistic, org.terracotta.statistics.SourceStatistic, org.terracotta.statistics.observer.OperationObserver
Known Direct Subclasses
org.terracotta.statistics.GeneralOperationStatistic
Annotations
@ContextAttribute:this
Imports
java.util.Collections, .EnumSet, .HashMap, .HashSet, .Map, .Set, org.terracotta.context.annotations.ContextAttribute, org.terracotta.statistics.observer.ChainedOperationObserver

Author
cdennis

Field Summary

Modifier and TypeField and Description
public final String
public final Map<String, Object>
public final Set<String>
public final Class<T>
Inherited from org.terracotta.statistics.AbstractSourceStatistic:
derivedStatistics

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractOperationStatistic(String name, Set<String> tags, Map<String, ? extends Object>
a set of context properties
properties
,
Class<T>
operation result type
type
)

Create an operation statistics for a given operation result type.

Method Summary

Modifier and TypeMethod and Description
public void
begin()

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

Called immediately prior to the operation beginning.
public ValueStatistic<Long>

Returns:

a ValueStatistic instance
statistic
(final T
the result of interest
result
)

Implements org.terracotta.statistics.OperationStatistic.statistic.

Return a ValueStatistic returning the count for the given result.
public ValueStatistic<Long>
public long
public Class<T>
Inherited from org.terracotta.statistics.AbstractSourceStatistic:
addDerivedStatisticremoveDerivedStatistic

Field Detail

nameback to summary
public final String name
Annotations
@ContextAttribute:name
propertiesback to summary
public final Map<String, Object> properties
Annotations
@ContextAttribute:properties
tagsback to summary
public final Set<String> tags
Annotations
@ContextAttribute:tags
typeback to summary
public final Class<T> type
Annotations
@ContextAttribute:type

Constructor Detail

AbstractOperationStatisticback to summary
pack-priv AbstractOperationStatistic(String name, Set<String> tags, Map<String, ? extends Object> properties, Class<T> type)

Create an operation statistics for a given operation result type.

Parameters
properties:Map<String, ? extends Object>

a set of context properties

type:Class<T>

operation result type

Method Detail

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
statisticback to summary
public ValueStatistic<Long> statistic(final T result)

Implements org.terracotta.statistics.OperationStatistic.statistic.

Return a ValueStatistic returning the count for the given result.

Parameters
result:T

the result of interest

Returns:ValueStatistic<Long>

a ValueStatistic instance

Annotations
@Override
statisticback to summary
public ValueStatistic<Long> statistic(final Set<T> results)

Implements org.terracotta.statistics.OperationStatistic.statistic, org.terracotta.statistics.OperationStatistic.statistic.

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