public class SuppliedValueStatistic<T extends java.io.Serializable> extends java.lang.Object implements ValueStatistic<T>
ValueStatistic
with a specific StatisticType
which value is given by a provided Supplier
Constructor and Description |
---|
SuppliedValueStatistic(org.terracotta.management.model.stats.StatisticType type,
java.util.function.Supplier<T> supplier) |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.Number> |
counter(java.util.function.Supplier<T> supplier) |
static <T extends java.io.Serializable> |
supply(org.terracotta.management.model.stats.StatisticType type,
java.util.function.Supplier<T> supplier) |
org.terracotta.management.model.stats.StatisticType |
type() |
T |
value() |
public SuppliedValueStatistic(org.terracotta.management.model.stats.StatisticType type, java.util.function.Supplier<T> supplier)
public T value()
value
in interface ValueStatistic<T extends java.io.Serializable>
public org.terracotta.management.model.stats.StatisticType type()
type
in interface ValueStatistic<T extends java.io.Serializable>
public static <T extends java.lang.Number> ValueStatistic<T> counter(java.util.function.Supplier<T> supplier)
public static <T extends java.io.Serializable> ValueStatistic<T> supply(org.terracotta.management.model.stats.StatisticType type, java.util.function.Supplier<T> supplier)