Package io.opencensus.tags
Class TagContext
- java.lang.Object
-
- io.opencensus.tags.TagContext
-
- Direct Known Subclasses:
ContextUtils.EmptyTagContext,NoopTags.NoopTagContext,TagMapImpl
@Immutable public abstract class TagContext extends java.lang.ObjectA map fromTagKeytoTagValuethat can be used to label anything that is associated with a specific operation.For example,
TagContexts can be used to label stats, log messages, or debugging information.- Since:
- 0.8
-
-
Constructor Summary
Constructors Constructor Description TagContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)Returns true iff the other object is an instance ofTagContextand contains the same key-value pairs.protected abstract java.util.Iterator<Tag>getIterator()Returns an iterator over the tags in thisTagContext.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getIterator
protected abstract java.util.Iterator<Tag> getIterator()
Returns an iterator over the tags in thisTagContext.- Returns:
- an iterator over the tags in this
TagContext. - Since:
- 0.8
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object other)Returns true iff the other object is an instance ofTagContextand contains the same key-value pairs. Implementations are free to override this method to provide better performance.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-