Package io.opencensus.implcore.tags
Class TaggerImpl
- java.lang.Object
-
- io.opencensus.tags.Tagger
-
- io.opencensus.implcore.tags.TaggerImpl
-
-
Field Summary
Fields Modifier and Type Field Description private CurrentStatestate
-
Constructor Summary
Constructors Constructor Description TaggerImpl(CurrentState state)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TagContextBuildercurrentBuilder()Returns a new builder created from the currentTagContext.TagMapImplempty()Returns an emptyTagContext.TagContextBuilderemptyBuilder()Returns a new emptyBuilder.TagMapImplgetCurrentTagContext()Returns the currentTagContext.TagContextBuildertoBuilder(TagContext tags)Returns a builder based on thisTagContext.private static TagMapBuilderImpltoTagMapBuilderImpl(TagContext tags)private static TagMapImpltoTagMapImpl(TagContext tags)ScopewithTagContext(TagContext tags)Enters the scope of code where the givenTagContextis in the current context (replacing the previousTagContext) and returns an object that represents that scope.
-
-
-
Field Detail
-
state
private final CurrentState state
-
-
Constructor Detail
-
TaggerImpl
TaggerImpl(CurrentState state)
-
-
Method Detail
-
empty
public TagMapImpl empty()
Description copied from class:TaggerReturns an emptyTagContext.
-
getCurrentTagContext
public TagMapImpl getCurrentTagContext()
Description copied from class:TaggerReturns the currentTagContext.- Specified by:
getCurrentTagContextin classTagger- Returns:
- the current
TagContext.
-
emptyBuilder
public TagContextBuilder emptyBuilder()
Description copied from class:TaggerReturns a new emptyBuilder.- Specified by:
emptyBuilderin classTagger- Returns:
- a new empty
Builder.
-
currentBuilder
public TagContextBuilder currentBuilder()
Description copied from class:TaggerReturns a new builder created from the currentTagContext.- Specified by:
currentBuilderin classTagger- Returns:
- a new builder created from the current
TagContext.
-
toBuilder
public TagContextBuilder toBuilder(TagContext tags)
Description copied from class:TaggerReturns a builder based on thisTagContext.
-
withTagContext
public Scope withTagContext(TagContext tags)
Description copied from class:TaggerEnters the scope of code where the givenTagContextis in the current context (replacing the previousTagContext) and returns an object that represents that scope. The scope is exited when the returned object is closed.- Specified by:
withTagContextin classTagger- Parameters:
tags- theTagContextto be set to the current context.- Returns:
- an object that defines a scope where the given
TagContextis set to the current context.
-
toTagMapImpl
private static TagMapImpl toTagMapImpl(TagContext tags)
-
toTagMapBuilderImpl
private static TagMapBuilderImpl toTagMapBuilderImpl(TagContext tags)
-
-