org.apache.hadoop.metrics2.lib
Class MetricMutableFactory

java.lang.Object
  extended by org.apache.hadoop.metrics2.lib.MetricMutableFactory

public class MetricMutableFactory
extends Object

Factory class for mutable metrics


Constructor Summary
MetricMutableFactory()
           
 
Method Summary
 MetricMutableCounterInt newCounter(String name, String description, int initValue)
          Create a mutable integer counter
 MetricMutableCounterLong newCounter(String name, String description, long initValue)
          Create a mutable long integer counter
 MetricMutableCounterInt newCounterInt(String name)
          Create a mutable integer counter with name only.
 MetricMutableCounterLong newCounterLong(String name)
          Create a mutable long integer counter with a name Usually gets overridden.
 MetricMutableGaugeInt newGauge(String name, String description, int initValue)
          Create a mutable integer gauge
 MetricMutableGaugeLong newGauge(String name, String description, long initValue)
          Create a mutable long integer gauge
 MetricMutableGaugeInt newGaugeInt(String name)
          Create a mutable integer gauge with name only.
 MetricMutableGaugeLong newGaugeLong(String name)
          Create a mutable long integer gauge with name only.
 MetricMutable newMetric(String name)
          Create a new mutable metric by name Usually overridden by app specific factory
 MetricMutableStat newStat(String name)
          Create a mutable stat metric with name only.
 MetricMutableStat newStat(String name, String description, String sampleName, String valueName, boolean extended)
          Create a mutable stat metric
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricMutableFactory

public MetricMutableFactory()
Method Detail

newMetric

public MetricMutable newMetric(String name)
Create a new mutable metric by name Usually overridden by app specific factory

Parameters:
name - of the metric
Returns:
a new metric object

newCounter

public MetricMutableCounterInt newCounter(String name,
                                          String description,
                                          int initValue)
Create a mutable integer counter

Parameters:
name - of the metric
description - of the metric
initValue - of the metric
Returns:
a new metric object

newCounterInt

public MetricMutableCounterInt newCounterInt(String name)
Create a mutable integer counter with name only. Usually gets overridden.

Parameters:
name - of the metric
Returns:
a new metric object

newCounter

public MetricMutableCounterLong newCounter(String name,
                                           String description,
                                           long initValue)
Create a mutable long integer counter

Parameters:
name - of the metric
description - of the metric
initValue - of the metric
Returns:
a new metric object

newCounterLong

public MetricMutableCounterLong newCounterLong(String name)
Create a mutable long integer counter with a name Usually gets overridden.

Parameters:
name - of the metric
Returns:
a new metric object

newGauge

public MetricMutableGaugeInt newGauge(String name,
                                      String description,
                                      int initValue)
Create a mutable integer gauge

Parameters:
name - of the metric
description - of the metric
initValue - of the metric
Returns:
a new metric object

newGaugeInt

public MetricMutableGaugeInt newGaugeInt(String name)
Create a mutable integer gauge with name only. Usually gets overridden.

Parameters:
name - of the metric
Returns:
a new metric object

newGauge

public MetricMutableGaugeLong newGauge(String name,
                                       String description,
                                       long initValue)
Create a mutable long integer gauge

Parameters:
name - of the metric
description - of the metric
initValue - of the metric
Returns:
a new metric object

newGaugeLong

public MetricMutableGaugeLong newGaugeLong(String name)
Create a mutable long integer gauge with name only. Usually gets overridden.

Parameters:
name - of the metric
Returns:
a new metric object

newStat

public MetricMutableStat newStat(String name,
                                 String description,
                                 String sampleName,
                                 String valueName,
                                 boolean extended)
Create a mutable stat metric

Parameters:
name - of the metric
description - of the metric
sampleName - of the metric (e.g., ops)
valueName - of the metric (e.g., time or latency)
extended - if true, produces extended stat (stdev, min/max etc.)
Returns:
a new metric object

newStat

public MetricMutableStat newStat(String name)
Create a mutable stat metric with name only. Usually gets overridden.

Parameters:
name - of the metric
Returns:
a new metric object


Copyright © 2009 The Apache Software Foundation