org.apache.hadoop.metrics2.util
Class MetricsCache
java.lang.Object
org.apache.hadoop.metrics2.util.MetricsCache
public class MetricsCache
- extends Object
A metrics cache for sinks that don't support sparse updates.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetricsCache
public MetricsCache()
update
public MetricsCache.Record update(MetricsRecord mr,
boolean includingTags)
- Update the cache and return the cached record
- Parameters:
mr
- the update recordincludingTags
- cache tag values (for later lookup by name) if true
- Returns:
- the updated cached record
update
public MetricsCache.Record update(MetricsRecord mr)
get
public MetricsCache.Record get(String name,
Collection<MetricsTag> tags)
- Get the cached record
- Parameters:
name
- of the recordtags
- of the record
- Returns:
- the cached record or null
Copyright © 2009 The Apache Software Foundation