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

Builder used to build a metrics record. More...

Inherited by Org.Apache.REEF.Common.Metrics.MetricsSystem.MetricsRecordBuilder.

Public Member Functions

IMetricsRecordBuilder AddTag (string name, string value)
 Adds metrics tag (MetricsTag) to the record More...
 
IMetricsRecordBuilder AddTag (IMetricsInfo info, string value)
 Adds metrics tag (MetricsTag) to the record More...
 
IMetricsRecordBuilder Add (MetricsTag tag)
 Adds an immutable metrics tag(MetricsTag) object. More...
 
IMetricsRecordBuilder Add (IImmutableMetric metric)
 Adds an immutable metric to the record. More...
 
IMetricsRecordBuilder SetContext (string value)
 Sets the special context tag of the record. More...
 
IMetricsRecordBuilder AddCounter (IMetricsInfo info, long value)
 Adds counter metric More...
 
IMetricsRecordBuilder AddGauge (IMetricsInfo info, long value)
 Adds long gauge metric More...
 
IMetricsRecordBuilder AddGauge (IMetricsInfo info, double value)
 Adds double gauge metric More...
 
IMetricsCollector ParentCollector ()
 Returns the parent IMetricsCollector object. More...
 
IMetricsCollector EndRecord ()
 Finalizes the record and enables adding multiple records in one line. More...
 
IMetricsRecord GetRecord ()
 Gives the underlying record. More...
 
bool IsEmpty ()
 Checks whether some record or tag has been added. More...
 

Detailed Description

Builder used to build a metrics record.

Used by IMetricsCollector to add a record, typically in IMetricsSource. Note that this interface will be used to take Mutable metrics and convert them to immutable ones (IImmutableMetric so that they can be consumed possibly at some later time also.

Member Function Documentation

◆ Add() [1/2]

IMetricsRecordBuilder Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.Add ( MetricsTag  tag)

Adds an immutable metrics tag(MetricsTag) object.

Avoids making a copy.

Parameters
tagA pre-made tags object.
Returns
Self to add more metrics/tags.

◆ Add() [2/2]

IMetricsRecordBuilder Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.Add ( IImmutableMetric  metric)

Adds an immutable metric to the record.

Saves making a new metric object.

Parameters
metricA pre-made metric object.
Returns
Self to add more metrics/tags.

◆ AddCounter()

IMetricsRecordBuilder Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.AddCounter ( IMetricsInfo  info,
long  value 
)

Adds counter metric

Parameters
infoMeta data of the metric
valueValue of the metric
Returns

◆ AddGauge() [1/2]

IMetricsRecordBuilder Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.AddGauge ( IMetricsInfo  info,
long  value 
)

Adds long gauge metric

Parameters
infoMeta data of the metric
valueValue of the metric
Returns

◆ AddGauge() [2/2]

IMetricsRecordBuilder Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.AddGauge ( IMetricsInfo  info,
double  value 
)

Adds double gauge metric

Parameters
infoMeta data of the metric
valueValue of the metric
Returns

◆ AddTag() [1/2]

IMetricsRecordBuilder Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.AddTag ( string  name,
string  value 
)

Adds metrics tag (MetricsTag) to the record

Parameters
nameName of the tag.
valueValue of the tag.
Returns
Self to add more metrics/tags.

◆ AddTag() [2/2]

IMetricsRecordBuilder Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.AddTag ( IMetricsInfo  info,
string  value 
)

Adds metrics tag (MetricsTag) to the record

Parameters
infoMeta data for the tag.
valueValue of the tag.
Returns
Self to add more metrics/tags.

◆ EndRecord()

IMetricsCollector Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.EndRecord ( )

Finalizes the record and enables adding multiple records in one line.

Returns
Parent IMetricsCollector object

◆ GetRecord()

IMetricsRecord Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.GetRecord ( )

Gives the underlying record.

Returns
Underlying record.

◆ IsEmpty()

bool Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.IsEmpty ( )

Checks whether some record or tag has been added.

Returns
True if none is added, false otherwise.

◆ ParentCollector()

IMetricsCollector Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.ParentCollector ( )

Returns the parent IMetricsCollector object.

Returns
Parent IMetricsCollector object

◆ SetContext()

IMetricsRecordBuilder Org.Apache.REEF.Common.Metrics.Api.IMetricsRecordBuilder.SetContext ( string  value)

Sets the special context tag of the record.

Parameters
valueValue of the context
Returns
Self to add more metrics/tags.

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