- java.lang.Object
-
- com.pervasive.datarush.monitoring.StatisticDefinition<GaugeSupplier>
-
- com.pervasive.datarush.monitoring.GaugeDefinition
-
- All Implemented Interfaces:
Serializable
public final class GaugeDefinition extends StatisticDefinition<GaugeSupplier>
Definition associated with aIntervalTimerSupplier
. Gauges may aggregate by eitherGaugeAggregator.SUM
,GaugeAggregator.MIN
, orGaugeAggregator.MAX
.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.pervasive.datarush.monitoring.StatisticDefinition
CATEGORY_GENERAL, CATEGORY_IO
-
-
Constructor Summary
Constructors Constructor Description GaugeDefinition(String id, String displayName)
Creates a definition with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GaugeSupplier
aggregate(List<? extends StatisticSupplier> values)
Performs aggregation across statistics.GaugeAggregator
aggregator()
Returns the aggregator to use for aggregating the gauge.GaugeDefinition
aggregator(GaugeAggregator aggregator)
Sets the aggregator to use for aggregating the gauge.GaugeSupplier
cast(StatisticSupplier value)
Casts theStatisticSupplier
to this definition, substituting a default value for null.GaugeDefinition
category(String category)
Sets the categoryGaugeSupplier
doFinalSnapshot(StatisticSupplier supplier)
GaugeDefinition
nonPartitioned(boolean nonPartitioned)
Indicates that this statistic refers to a concept that is inherently non-parallel.RangeAggregator
rangeAggregator()
Returns the aggregator to use for aggregating the gauge's range of allowed values.GaugeDefinition
rangeAggregator(RangeAggregator rangeAggregator)
Sets the aggregator to use for aggregating the gauge's range of allowed values.String
shortName()
Returns a shortened name that can be used in some ui display contexts.GaugeDefinition
shortName(String shortName)
Sets a shortened name that can be used in some ui display contexts.UnitOfMeasure
unitOfMeasure()
Returns the unit of measure.GaugeDefinition
unitOfMeasure(UnitOfMeasure unitOfMeasure)
Sets the unit of measure.-
Methods inherited from class com.pervasive.datarush.monitoring.StatisticDefinition
category, cpuTime, displayName, duration, equals, finalSnapshot, hashCode, id, ioBytes, ioCount, nonPartitioned, toString
-
-
-
-
Constructor Detail
-
GaugeDefinition
public GaugeDefinition(String id, String displayName)
Creates a definition with default values. This aggregates via sum. The unit of measure is unspecified. Ranges aggregate byRangeAggregator.WIDEST
.- Parameters:
id
- the id for the statisticdisplayName
- the display name of this statistic
-
-
Method Detail
-
aggregator
public GaugeAggregator aggregator()
Returns the aggregator to use for aggregating the gauge.- Returns:
- the aggregator to use for aggregating the gauge.
-
unitOfMeasure
public UnitOfMeasure unitOfMeasure()
Returns the unit of measure.- Returns:
- the unit of measure.
-
shortName
public String shortName()
Returns a shortened name that can be used in some ui display contexts. By default this is the same asStatisticDefinition.displayName()
.- Returns:
- a short name
-
rangeAggregator
public RangeAggregator rangeAggregator()
Returns the aggregator to use for aggregating the gauge's range of allowed values.- Returns:
- the aggregator to use for aggregating the gauge's range of allowed values.
-
aggregator
public GaugeDefinition aggregator(GaugeAggregator aggregator)
Sets the aggregator to use for aggregating the gauge.- Parameters:
aggregator
- the aggregation for the gauge.- Returns:
- a newly-created
GaugeStatisticDefinition
.
-
rangeAggregator
public GaugeDefinition rangeAggregator(RangeAggregator rangeAggregator)
Sets the aggregator to use for aggregating the gauge's range of allowed values.- Parameters:
aggregator
- the aggregation for the gauge's range- Returns:
- a newly-created
GaugeStatisticDefinition
.
-
unitOfMeasure
public GaugeDefinition unitOfMeasure(UnitOfMeasure unitOfMeasure)
Sets the unit of measure.- Parameters:
unitOfMeasure
- the unit of measure- Returns:
- a newly-created
GaugeStatisticDefinition
.
-
shortName
public GaugeDefinition shortName(String shortName)
Sets a shortened name that can be used in some ui display contexts. By default this is the same asStatisticDefinition.displayName()
.- Parameters:
shortName
- a short name- Returns:
- a newly-created
GaugeStatisticDefinition
.
-
category
public GaugeDefinition category(String category)
Description copied from class:StatisticDefinition
Sets the category- Specified by:
category
in classStatisticDefinition<GaugeSupplier>
- Parameters:
category
- the category- Returns:
- a newly-created
StatisticDefinition
.
-
aggregate
public GaugeSupplier aggregate(List<? extends StatisticSupplier> values)
Description copied from class:StatisticDefinition
Performs aggregation across statistics. Statistics will be aggregated in a manner specific to the concrete definition.- Specified by:
aggregate
in classStatisticDefinition<GaugeSupplier>
- Parameters:
values
- the values to aggregate- Returns:
- the aggregated value
-
doFinalSnapshot
public GaugeSupplier doFinalSnapshot(StatisticSupplier supplier)
-
cast
public GaugeSupplier cast(StatisticSupplier value)
Description copied from class:StatisticDefinition
Casts theStatisticSupplier
to this definition, substituting a default value for null.- Specified by:
cast
in classStatisticDefinition<GaugeSupplier>
- Parameters:
value
- the value- Returns:
- a casted value or default if null.
-
nonPartitioned
public GaugeDefinition nonPartitioned(boolean nonPartitioned)
Description copied from class:StatisticDefinition
Indicates that this statistic refers to a concept that is inherently non-parallel. An example would be planning statistics.- Specified by:
nonPartitioned
in classStatisticDefinition<GaugeSupplier>
- Parameters:
nonPartitioned
- whether this statistic refers to a non-partitioned concept- Returns:
- a newly-created
StatisticDefinition
.
-
-