- java.lang.Object
-
- com.pervasive.datarush.graphs.LogicalStatistic
-
- All Implemented Interfaces:
Serializable
,Comparable<LogicalStatistic>
public final class LogicalStatistic extends Object implements Serializable, Comparable<LogicalStatistic>
Statistic associated with aLogicalPort
or aLogicalOperator
. Statistics are keyed by the following items:definition
, wheredefinition
provides the definition of the statisticpath
, wherepath
provides the path of the port or operatornodeID
, wherenodeID
provides the host and thread offset within the host.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LogicalStatistic.Builder
A builder for statistics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(LogicalStatistic other)
StatisticDefinition<?>
definition()
Returns the definition associated with this statistic.LogicalStatistic
finalSnapshot()
Returns a snapshot view of these statistics with all statistics appropriate for a graph that is in a terminated state.VirtualNodeID
nodeID()
Returns the node described by this statistics object.VirtualNodeID
originalNodeID()
Returns the original node described by this statistics object.GraphPath
path()
Returns the full path of the port or operator described by this statistics object.LogicalStatistic
snapshot()
Returns a snapshot view of these statistics.RuntimeStatistic<?>
statistic()
Returns the pair ofdefinition()
andsupplier()
.StatisticSupplier
supplier()
Returns the supplier associated with this statistic.String
toString()
-
-
-
Method Detail
-
path
public GraphPath path()
Returns the full path of the port or operator described by this statistics object.- Returns:
- the full path
-
nodeID
public VirtualNodeID nodeID()
Returns the node described by this statistics object.- Returns:
- the node
-
originalNodeID
public VirtualNodeID originalNodeID()
Returns the original node described by this statistics object. This will normally be the same asnodeID()
. In the event of a failure, this represents the node that failed, where this unit of work was originally scheduled.- Returns:
- the original node ID
-
snapshot
public LogicalStatistic snapshot()
Returns a snapshot view of these statistics. A snapshot view is guaranteed not to change as the graph executes.- Returns:
- a snapshot view of these statistics
-
finalSnapshot
public LogicalStatistic finalSnapshot()
Returns a snapshot view of these statistics with all statistics appropriate for a graph that is in a terminated state.- Returns:
- a snapshot view of these statistics
-
statistic
public RuntimeStatistic<?> statistic()
Returns the pair ofdefinition()
andsupplier()
.- Returns:
- the definition and supplier pair;
-
definition
public StatisticDefinition<?> definition()
Returns the definition associated with this statistic. Determines metadata for this statistic including display name and how the statistic is to be aggregated across partitions.- Returns:
- the definition.
-
supplier
public StatisticSupplier supplier()
Returns the supplier associated with this statistic. This controls the instrumentation for this statistic if this statistic is live. Otherwise, if this statistic is a snapshot, the supplier is an immutable value holder.- Returns:
- the supplier for this statistic
-
compareTo
public int compareTo(LogicalStatistic other)
- Specified by:
compareTo
in interfaceComparable<LogicalStatistic>
-
-