Top Fields Constructors Methods
org.terracotta.statistics.registry

public Class Statistic<T extends java.io.Serializable>

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
org.terracotta.statistics.Sample, .SampledStatistic, .StatisticType, .Table, .ValueStatistic, java.io.Serializable, java.util.Collections, .List, .Optional

Author
Mathieu Carbou

Field Summary

Modifier and TypeField and Description
private final List<Sample<T>>
private static final long
private final StatisticType

Constructor Summary

AccessConstructor and Description
public
public
Statistic(StatisticType type, Sample<T> sample)

public
Statistic(StatisticType type, List<Sample<T>> samples)

Method Summary

Modifier and TypeMethod and Description
private static <T extends Serializable> boolean
accepted(T sample)

pack-priv static <T extends Serializable> Statistic<T>
extract(ValueStatistic<T> valueStatistic, long sinceMillis, long now)

public Optional<Sample<T>>
public Optional<T>
public List<Sample<T>>
public StatisticType
public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

samplesback to summary
private final List<Sample<T>> samples
serialVersionUIDback to summary
private static final long serialVersionUID
typeback to summary
private final StatisticType type

Constructor Detail

Statisticback to summary
public Statistic(StatisticType type)
Statisticback to summary
public Statistic(StatisticType type, Sample<T> sample)
Statisticback to summary
public Statistic(StatisticType type, List<Sample<T>> samples)

Method Detail

acceptedback to summary
private static <T extends Serializable> boolean accepted(T sample)
extractback to summary
pack-priv static <T extends Serializable> Statistic<T> extract(ValueStatistic<T> valueStatistic, long sinceMillis, long now)
getLatestSampleback to summary
public Optional<Sample<T>> getLatestSample()
getLatestSampleValueback to summary
public Optional<T> getLatestSampleValue()
getSamplesback to summary
public List<Sample<T>> getSamples()
getTypeback to summary
public StatisticType getType()
isEmptyback to summary
public boolean isEmpty()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override