org.apache.hadoop.metrics.spi
Class NullContext

java.lang.Object
  extended by org.apache.hadoop.metrics.spi.AbstractMetricsContext
      extended by org.apache.hadoop.metrics.spi.NullContext
All Implemented Interfaces:
MetricsContext

public class NullContext
extends AbstractMetricsContext

Null metrics context: a metrics context which does nothing. Used as the default context, so that no performance data is emitted if no configuration data is found.


Field Summary
 
Fields inherited from interface org.apache.hadoop.metrics.MetricsContext
DEFAULT_PERIOD
 
Constructor Summary
NullContext()
          Creates a new instance of NullContext
 
Method Summary
protected  void emitRecord(String contextName, String recordName, OutputRecord outRec)
          Do-nothing version of emitRecord
protected  void remove(MetricsRecordImpl record)
          Do-nothing version of remove
 void startMonitoring()
          Do-nothing version of startMonitoring
protected  void update(MetricsRecordImpl record)
          Do-nothing version of update
 
Methods inherited from class org.apache.hadoop.metrics.spi.AbstractMetricsContext
close, createRecord, flush, getAttribute, getAttributeTable, getContextFactory, getContextName, getPeriod, init, isMonitoring, newRecord, registerUpdater, setPeriod, stopMonitoring, unregisterUpdater
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullContext

public NullContext()
Creates a new instance of NullContext

Method Detail

startMonitoring

public void startMonitoring()
Do-nothing version of startMonitoring

Specified by:
startMonitoring in interface MetricsContext
Overrides:
startMonitoring in class AbstractMetricsContext

emitRecord

protected void emitRecord(String contextName,
                          String recordName,
                          OutputRecord outRec)
Do-nothing version of emitRecord

Specified by:
emitRecord in class AbstractMetricsContext

update

protected void update(MetricsRecordImpl record)
Do-nothing version of update

Overrides:
update in class AbstractMetricsContext

remove

protected void remove(MetricsRecordImpl record)
Do-nothing version of remove

Overrides:
remove in class AbstractMetricsContext


Copyright © 2006 The Apache Software Foundation