Package io.opencensus.stats
Class NoopStats.NoopStatsComponent
java.lang.Object
io.opencensus.stats.StatsComponent
io.opencensus.stats.NoopStats.NoopStatsComponent
- Enclosing class:
NoopStats
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetState()
Returns the currentStatsCollectionState
.Returns the defaultStatsRecorder
.Returns the defaultViewManager
.void
setState
(StatsCollectionState state) Deprecated.
-
Field Details
-
viewManager
-
isRead
private volatile boolean isRead
-
-
Constructor Details
-
NoopStatsComponent
private NoopStatsComponent()
-
-
Method Details
-
getViewManager
Description copied from class:StatsComponent
Returns the defaultViewManager
.- Specified by:
getViewManager
in classStatsComponent
-
getStatsRecorder
Description copied from class:StatsComponent
Returns the defaultStatsRecorder
.- Specified by:
getStatsRecorder
in classStatsComponent
-
getState
Description copied from class:StatsComponent
Returns the currentStatsCollectionState
.When no implementation is available,
getState
always returnsStatsCollectionState.DISABLED
.Once
StatsComponent.getState()
is called, subsequent calls toStatsComponent.setState(StatsCollectionState)
will throw anIllegalStateException
.- Specified by:
getState
in classStatsComponent
- Returns:
- the current
StatsCollectionState
.
-
setState
Deprecated.Description copied from class:StatsComponent
Sets the currentStatsCollectionState
.When no implementation is available,
setState
does not change the state.If state is set to
StatsCollectionState.DISABLED
, all stats that are previously recorded will be cleared.- Specified by:
setState
in classStatsComponent
- Parameters:
state
- the newStatsCollectionState
.
-