Top Description Fields Constructors Methods
org.terracotta.statistics

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

extends Object
implements ValueStatistic<T extends Serializable>
Class Inheritance
All Implemented Interfaces
org.terracotta.statistics.ValueStatistic
Imports
java.io.Serializable, java.util.Objects, java.util.function.Supplier

This class can be used to create a ValueStatistic with a specific StatisticType which value is given by a provided Supplier
Author
Mathieu Carbou

Field Summary

Modifier and TypeField and Description
private final Supplier<T>
private final StatisticType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public StatisticType
public T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

supplierback to summary
private final Supplier<T> supplier
typeback to summary
private final StatisticType type

Constructor Detail

SuppliedValueStatisticback to summary
public SuppliedValueStatistic(StatisticType type, Supplier<T> supplier)

Method Detail

typeback to summary
public StatisticType type()

Implements org.terracotta.statistics.ValueStatistic.type.

Returns:StatisticType

Doc from org.terracotta.statistics.ValueStatistic.type.

The statistic type

Annotations
@Override
valueback to summary
public T value()

Implements org.terracotta.statistics.ValueStatistic.value.

Returns:T

Doc from org.terracotta.statistics.ValueStatistic.value.

The current statistic value

Annotations
@Override