public abstract class MetricMutable extends Object
限定符和类型 | 字段和说明 |
---|---|
String |
description
description of the metric
|
String |
name
name of the metric
|
构造器和说明 |
---|
MetricMutable(String name,
String description)
Construct a mutable metric
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
changed() |
protected void |
clearChanged()
Clear the changed flag in the snapshot operations
|
protected void |
setChanged()
Set the changed flag in mutable operations
|
void |
snapshot(MetricsRecordBuilder builder)
Get a sampe/snapshot of metric if changed
|
abstract void |
snapshot(MetricsRecordBuilder builder,
boolean all)
Get a snapshot/snapshot of the metric
|
public final String name
public final String description
public abstract void snapshot(MetricsRecordBuilder builder, boolean all)
builder
- the metrics record builderall
- if true, snapshot unchanged metrics as wellpublic void snapshot(MetricsRecordBuilder builder)
builder
- the metrics record builderprotected void setChanged()
protected void clearChanged()
public boolean changed()
Copyright © 2009 The Apache Software Foundation