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 boolean
isRead
private ViewManager
viewManager
-
Constructor Summary
Constructors Modifier Constructor Description private
NoopStatsComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StatsCollectionState
getState()
Returns the currentStatsCollectionState
.StatsRecorder
getStatsRecorder()
Returns the defaultStatsRecorder
.ViewManager
getViewManager()
Returns the defaultViewManager
.void
setState(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:StatsComponent
Returns the defaultViewManager
.- Specified by:
getViewManager
in classStatsComponent
-
getStatsRecorder
public StatsRecorder getStatsRecorder()
Description copied from class:StatsComponent
Returns the defaultStatsRecorder
.- Specified by:
getStatsRecorder
in classStatsComponent
-
getState
public StatsCollectionState 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 public void setState(StatsCollectionState state)
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
.
-
-