Class ImmutableMetrics
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.process.traversal.util.ImmutableMetrics
 
- 
- All Implemented Interfaces:
- Serializable,- Metrics
 - Direct Known Subclasses:
- MutableMetrics
 
 public class ImmutableMetrics extends Object implements Metrics, Serializable AMetricsimplementation that cannot be modified.- Author:
- Bob Briody (http://bobbriody.com), Stephen Mallette (http://stephen.genoprime.com)
- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected Map<String,Object>annotationsprotected Map<String,AtomicLong>countsprotected longdurationNsprotected Stringidprotected Stringnameprotected Map<String,ImmutableMetrics>nested
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedImmutableMetrics()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetAnnotation(String key)Obtain the annotation with the specified key.Map<String,Object>getAnnotations()Obtain the annotations for this Metrics.LonggetCount(String key)Get the count for the corresponding countKey.Map<String,Long>getCounts()Get the map of all counters.longgetDuration(TimeUnit unit)Get the duration of execution time taken.StringgetId()Id of this Metrics.StringgetName()Name of this Metrics.Collection<ImmutableMetrics>getNested()Get the nested Metrics objects.ImmutableMetricsgetNested(String metricsId)Get a nested Metrics object by Id.StringtoString()
 
- 
- 
- 
Method Detail- 
getDurationpublic long getDuration(TimeUnit unit) Description copied from interface:MetricsGet the duration of execution time taken.- Specified by:
- getDurationin interface- Metrics
 
 - 
getCountpublic Long getCount(String key) Description copied from interface:MetricsGet the count for the corresponding countKey. Returns null if countKey does not exist.
 - 
getCountspublic Map<String,Long> getCounts() Description copied from interface:MetricsGet the map of all counters. This method copies the internal map.
 - 
getNestedpublic Collection<ImmutableMetrics> getNested() Description copied from interface:MetricsGet the nested Metrics objects. Metrics will be ordered in the order they were inserted.
 - 
getNestedpublic ImmutableMetrics getNested(String metricsId) Description copied from interface:MetricsGet a nested Metrics object by Id.
 - 
getAnnotationspublic Map<String,Object> getAnnotations() Description copied from interface:MetricsObtain the annotations for this Metrics. Values may be of type String or Number.- Specified by:
- getAnnotationsin interface- Metrics
- Returns:
- the annotations for this Metrics. Modifications to the returned object are persisted in the original.
 
 - 
getAnnotationpublic Object getAnnotation(String key) Description copied from interface:MetricsObtain the annotation with the specified key. Values may be of type String or Number.- Specified by:
- getAnnotationin interface- Metrics
- Parameters:
- key- key of the annotation to obtain.
 
 
- 
 
-