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 CurrentState
currentState
private static CurrentState.State
DEFAULT_STATE
private Tagger
tagger
private TagPropagationComponent
tagPropagationComponent
-
Constructor Summary
Constructors Constructor Description TagsComponentImplBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TaggingState
getState()
Returns the currentTaggingState
.Tagger
getTagger()
Returns theTagger
for this implementation.TagPropagationComponent
getTagPropagationComponent()
Returns theTagPropagationComponent
for this implementation.void
setState(TaggingState newState)
Deprecated.private static TaggingState
stateToTaggingState(CurrentState.State state)
private static CurrentState.State
taggingStateToState(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:TagsComponent
Returns theTagger
for this implementation.- Specified by:
getTagger
in classTagsComponent
-
getTagPropagationComponent
public TagPropagationComponent getTagPropagationComponent()
Description copied from class:TagsComponent
Returns theTagPropagationComponent
for this implementation.- Specified by:
getTagPropagationComponent
in classTagsComponent
-
getState
public TaggingState getState()
Description copied from class:TagsComponent
Returns the currentTaggingState
.When no implementation is available,
getState
always returnsTaggingState.DISABLED
.Once
TagsComponent.getState()
is called, subsequent calls toTagsComponent.setState(TaggingState)
will throw anIllegalStateException
.- Specified by:
getState
in classTagsComponent
- Returns:
- the current
TaggingState
.
-
setState
@Deprecated public void setState(TaggingState newState)
Deprecated.Description copied from class:TagsComponent
Sets the currentTaggingState
.When no implementation is available,
setState
does not change the state.- Specified by:
setState
in classTagsComponent
- Parameters:
newState
- the newTaggingState
.
-
taggingStateToState
private static CurrentState.State taggingStateToState(TaggingState taggingState)
-
stateToTaggingState
private static TaggingState stateToTaggingState(CurrentState.State state)
-
-