Apache REEF  0.16.0
Retainable Evaluator Execution Framework
Public Member Functions | Properties | List of all members
Org.Apache.REEF.Common.Metrics.Api.IImmutableMetric Interface Reference

Immutable metric interface. More...

Inherited by Org.Apache.REEF.Common.Metrics.Api.ImmutableMetricsImpl.

Public Member Functions

string ToString ()
 String representation of a metric for display. More...
 
bool Equals (object obj)
 Checks whether two metrics are equal. More...
 
int GetHashCode ()
 Return hash code of the metric object. More...
 
void Visit (IMetricsVisitor visitor)
 Accepts a visitor interface. More...
 

Properties

long LongValue [get]
 Long Value of the metric. More...
 
double NumericValue [get]
 Numeric Value of the metric. More...
 
IMetricsInfo Info [get]
 Meta-data of the metric. More...
 
MetricType TypeOfMetric [get]
 Type of metric - counter or gauge. More...
 

Detailed Description

Immutable metric interface.

All the metrics put in the IMetricsRecord by IMetricsSource are kept as IImmutableMetric.

Member Function Documentation

◆ Equals()

bool Org.Apache.REEF.Common.Metrics.Api.IImmutableMetric.Equals ( object  obj)

Checks whether two metrics are equal.

Relies on Equals function of IMetricsInfo implementations.

Parameters
objObject to compare against.
Returns
True if both represent the same metric.

◆ GetHashCode()

int Org.Apache.REEF.Common.Metrics.Api.IImmutableMetric.GetHashCode ( )

Return hash code of the metric object.

Simply uses the hash of ToString() method.

Returns
Hash code.

◆ ToString()

string Org.Apache.REEF.Common.Metrics.Api.IImmutableMetric.ToString ( )

String representation of a metric for display.

Returns
The string representation of the metric.

◆ Visit()

void Org.Apache.REEF.Common.Metrics.Api.IImmutableMetric.Visit ( IMetricsVisitor  visitor)

Accepts a visitor interface.

This function is used to get exact metric specfic information (for example, if visitor implementation wants to determine whether it is a counter or gauge, etc., by making the exact implementation of IImmutableMetric call the appropriate function in IMetricsVisitor.

Parameters
visitorMetrics visitor interface.

Property Documentation

◆ Info

IMetricsInfo Org.Apache.REEF.Common.Metrics.Api.IImmutableMetric.Info
get

Meta-data of the metric.

◆ LongValue

long Org.Apache.REEF.Common.Metrics.Api.IImmutableMetric.LongValue
get

Long Value of the metric.

Immutable metrics of type integrals, byte, bool are all type casted to long before storing them as immutable metrics. For a given instance of this interface, either this property or NumericValue returns a valid value.

◆ NumericValue

double Org.Apache.REEF.Common.Metrics.Api.IImmutableMetric.NumericValue
get

Numeric Value of the metric.

Immutable metrics of non integral numerical types are all type casted to double before storing them as immutable metrics. For a given instance of this interface, either this property or LongValue returns a valid value.

◆ TypeOfMetric

MetricType Org.Apache.REEF.Common.Metrics.Api.IImmutableMetric.TypeOfMetric
get

Type of metric - counter or gauge.

Filled in by exact metric type. It is assumed that converting complex metrics like Stats and Rates in to immutable ones require their decomposition in to multiple instances of IImmutableMetric, for example: number of samples will be of type counter, mean, variance etc. will be of type gauge, etc.


The documentation for this interface was generated from the following file: