Package io.opencensus.implcore.tags
Class TagsComponentImplBase
- java.lang.Object
-
- io.opencensus.tags.TagsComponent
-
- io.opencensus.implcore.tags.TagsComponentImplBase
-
- Direct Known Subclasses:
TagsComponentImpl,TagsComponentImplLite
public class TagsComponentImplBase extends TagsComponent
Base implementation ofTagsComponent.
-
-
Field Summary
Fields Modifier and Type Field Description private CurrentStatecurrentStateprivate static CurrentState.StateDEFAULT_STATEprivate Taggertaggerprivate TagPropagationComponenttagPropagationComponent
-
Constructor Summary
Constructors Constructor Description TagsComponentImplBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TaggingStategetState()Returns the currentTaggingState.TaggergetTagger()Returns theTaggerfor this implementation.TagPropagationComponentgetTagPropagationComponent()Returns theTagPropagationComponentfor this implementation.voidsetState(TaggingState newState)Deprecated.private static TaggingStatestateToTaggingState(CurrentState.State state)private static CurrentState.StatetaggingStateToState(TaggingState taggingState)
-
-
-
Field Detail
-
DEFAULT_STATE
private static final CurrentState.State DEFAULT_STATE
-
currentState
private final CurrentState currentState
-
tagger
private final Tagger tagger
-
tagPropagationComponent
private final TagPropagationComponent tagPropagationComponent
-
-
Method Detail
-
getTagger
public Tagger getTagger()
Description copied from class:TagsComponentReturns theTaggerfor this implementation.- Specified by:
getTaggerin classTagsComponent
-
getTagPropagationComponent
public TagPropagationComponent getTagPropagationComponent()
Description copied from class:TagsComponentReturns theTagPropagationComponentfor this implementation.- Specified by:
getTagPropagationComponentin classTagsComponent
-
getState
public TaggingState getState()
Description copied from class:TagsComponentReturns the currentTaggingState.When no implementation is available,
getStatealways returnsTaggingState.DISABLED.Once
TagsComponent.getState()is called, subsequent calls toTagsComponent.setState(TaggingState)will throw anIllegalStateException.- Specified by:
getStatein classTagsComponent- Returns:
- the current
TaggingState.
-
setState
@Deprecated public void setState(TaggingState newState)
Deprecated.Description copied from class:TagsComponentSets the currentTaggingState.When no implementation is available,
setStatedoes not change the state.- Specified by:
setStatein classTagsComponent- Parameters:
newState- the newTaggingState.
-
taggingStateToState
private static CurrentState.State taggingStateToState(TaggingState taggingState)
-
stateToTaggingState
private static TaggingState stateToTaggingState(CurrentState.State state)
-
-