T
- the type of StatisticSupplier
associated with this statistic.public abstract class StatisticDefinition<T extends StatisticSupplier> extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
CATEGORY_GENERAL
The name of the default category
|
static String |
CATEGORY_IO
The name of the category for I/O related statistics
|
Modifier and Type | Method and Description |
---|---|
abstract T |
aggregate(List<? extends StatisticSupplier> values)
Performs aggregation across statistics.
|
abstract T |
cast(StatisticSupplier value)
Casts the
StatisticSupplier to this definition, substituting
a default value for null. |
String |
category()
Returns a category for this statistic type.
|
abstract StatisticDefinition<T> |
category(String category)
Sets the category
|
static CounterDefinition |
cpuTime()
A statistic that provides the cpu time in milliseconds.
|
String |
displayName()
Returns a display name for this statistic type.
|
static IntervalTimerDefinition |
duration()
A statistic that provides the total time that an operation
has been running.
|
boolean |
equals(Object o)
Two
StatisticDefinition 's are considered equal iff their
ids are equal. |
T |
finalSnapshot(StatisticSupplier supplier)
Returns a snapshot view of the given statistics with all statistics appropriate for a graph
that is in a terminated state.
|
int |
hashCode()
Returns a hashCode for this definition based on its
id() |
String |
id()
Returns a unique identifier for this statistic type.
|
static CounterDefinition |
ioBytes(String provider,
IOChannelOperation operation)
A statistic that provides the number of io bytes.
|
static CounterDefinition |
ioCount(String provider,
IOChannelOperation operation)
A statistic that provides the number of io operations.
|
boolean |
nonPartitioned()
Indicates that this statistic refers to a concept that is inherently
non-parallel.
|
abstract StatisticDefinition<T> |
nonPartitioned(boolean nonPartitioned)
Indicates that this statistic refers to a concept that is inherently
non-parallel.
|
String |
toString() |
public static final String CATEGORY_GENERAL
public static final String CATEGORY_IO
public static IntervalTimerDefinition duration()
IntervalTimerDefinition
's always aggregate:
public static CounterDefinition cpuTime()
StatisticState.FINISHED
when the operator
finishes execution. This statistic aggregates horizontally
by summation. This statistic aggregates vertically (within a composite)
by summation as well.public static CounterDefinition ioBytes(String provider, IOChannelOperation operation)
provider
- the filesystem provideroperation
- the read/write operationpublic static CounterDefinition ioCount(String provider, IOChannelOperation operation)
provider
- the filesystem provideroperation
- the read/write operationpublic final String id()
public final String displayName()
public final String category()
public final boolean nonPartitioned()
public final int hashCode()
id()
public final boolean equals(Object o)
StatisticDefinition
's are considered equal iff their
ids are equal.equals
in class Object
StatisticDefinition
of the same name
as this.public abstract StatisticDefinition<T> category(String category)
category
- the categoryStatisticDefinition
.public abstract StatisticDefinition<T> nonPartitioned(boolean nonPartitioned)
nonPartitioned
- whether this statistic refers to a non-partitioned conceptStatisticDefinition
.public abstract T cast(StatisticSupplier value)
StatisticSupplier
to this definition, substituting
a default value for null.value
- the valueClassCastException
- if the supplier is not of type T
public final T finalSnapshot(StatisticSupplier supplier)
supplier
- the original statisticClassCastException
- if the supplier is not of type T
public abstract T aggregate(List<? extends StatisticSupplier> values)
values
- the values to aggregateClassCastException
- if any of the values are not of type T
Copyright © 2024 Actian Corporation. All rights reserved.