Package io.opencensus.stats
Class NoopStats.NoopStatsComponent
- java.lang.Object
-
- io.opencensus.stats.StatsComponent
-
- io.opencensus.stats.NoopStats.NoopStatsComponent
-
- Enclosing class:
- NoopStats
@ThreadSafe private static final class NoopStats.NoopStatsComponent extends StatsComponent
-
-
Field Summary
Fields Modifier and Type Field Description private booleanisReadprivate ViewManagerviewManager
-
Constructor Summary
Constructors Modifier Constructor Description privateNoopStatsComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StatsCollectionStategetState()Returns the currentStatsCollectionState.StatsRecordergetStatsRecorder()Returns the defaultStatsRecorder.ViewManagergetViewManager()Returns the defaultViewManager.voidsetState(StatsCollectionState state)Deprecated.
-
-
-
Field Detail
-
viewManager
private final ViewManager viewManager
-
isRead
private volatile boolean isRead
-
-
Method Detail
-
getViewManager
public ViewManager getViewManager()
Description copied from class:StatsComponentReturns the defaultViewManager.- Specified by:
getViewManagerin classStatsComponent
-
getStatsRecorder
public StatsRecorder getStatsRecorder()
Description copied from class:StatsComponentReturns the defaultStatsRecorder.- Specified by:
getStatsRecorderin classStatsComponent
-
getState
public StatsCollectionState getState()
Description copied from class:StatsComponentReturns the currentStatsCollectionState.When no implementation is available,
getStatealways returnsStatsCollectionState.DISABLED.Once
StatsComponent.getState()is called, subsequent calls toStatsComponent.setState(StatsCollectionState)will throw anIllegalStateException.- Specified by:
getStatein classStatsComponent- Returns:
- the current
StatsCollectionState.
-
setState
@Deprecated public void setState(StatsCollectionState state)
Deprecated.Description copied from class:StatsComponentSets the currentStatsCollectionState.When no implementation is available,
setStatedoes not change the state.If state is set to
StatsCollectionState.DISABLED, all stats that are previously recorded will be cleared.- Specified by:
setStatein classStatsComponent- Parameters:
state- the newStatsCollectionState.
-
-