Class ImmutableMetrics
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.util.ImmutableMetrics
- All Implemented Interfaces:
Serializable,Metrics
- Direct Known Subclasses:
MutableMetrics
A
Metrics implementation that cannot be modified.- Author:
- Bob Briody (http://bobbriody.com), Stephen Mallette (http://stephen.genoprime.com)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,AtomicLong> protected longprotected Stringprotected Stringprotected final Map<String,ImmutableMetrics> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotation(String key) Obtain the annotation with the specified key.Obtain the annotations for this Metrics.Get the count for the corresponding countKey.Get the map of all counters.longgetDuration(TimeUnit unit) Get the duration of execution time taken.getId()Id of this Metrics.getName()Name of this Metrics.Get the nested Metrics objects.Get a nested Metrics object by Id.toString()
-
Field Details
-
id
-
name
-
counts
-
durationNs
protected long durationNs -
annotations
-
nested
-
-
Constructor Details
-
ImmutableMetrics
protected ImmutableMetrics()
-
-
Method Details
-
getDuration
Description copied from interface:MetricsGet the duration of execution time taken.- Specified by:
getDurationin interfaceMetrics
-
getCount
Description copied from interface:MetricsGet the count for the corresponding countKey. Returns null if countKey does not exist. -
getCounts
Description copied from interface:MetricsGet the map of all counters. This method copies the internal map. -
getName
Description copied from interface:MetricsName of this Metrics. -
getId
Description copied from interface:MetricsId of this Metrics. -
getNested
Description copied from interface:MetricsGet the nested Metrics objects. Metrics will be ordered in the order they were inserted. -
getNested
Description copied from interface:MetricsGet a nested Metrics object by Id. -
getAnnotations
Description copied from interface:MetricsObtain the annotations for this Metrics. Values may be of type String or Number.- Specified by:
getAnnotationsin interfaceMetrics- Returns:
- the annotations for this Metrics. Modifications to the returned object are persisted in the original.
-
getAnnotation
Description copied from interface:MetricsObtain the annotation with the specified key. Values may be of type String or Number.- Specified by:
getAnnotationin interfaceMetrics- Parameters:
key- key of the annotation to obtain.
-
toString
-