Package io.opencensus.implcore.internal
Class CurrentState
java.lang.Object
io.opencensus.implcore.internal.CurrentState
The current state base implementation for stats and tags.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enum
static enum
Current state for stats or tags. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCurrentState
(CurrentState.State defaultState) Constructs a newCurrentState
. -
Method Summary
Modifier and TypeMethodDescriptionget()
Returns the current state and updates the status as being read.Returns the current state without updating the status as being read.boolean
set
(CurrentState.State state) Sets current state to the given state.
-
Field Details
-
currentInternalState
-
-
Constructor Details
-
CurrentState
Constructs a newCurrentState
.- Parameters:
defaultState
- the default initial state.
-
-
Method Details
-
get
Returns the current state and updates the status as being read.- Returns:
- the current state and updates the status as being read.
-
getInternal
Returns the current state without updating the status as being read.- Returns:
- the current state without updating the status as being read.
-
set
Sets current state to the given state. Returns true if the current state is changed, false otherwise.- Parameters:
state
- the state to be set.- Returns:
- true if the current state is changed, false otherwise.
-