Package io.opencensus.implcore.stats
Class ViewManagerImpl
- java.lang.Object
-
- io.opencensus.stats.ViewManager
-
- io.opencensus.implcore.stats.ViewManagerImpl
-
public final class ViewManagerImpl extends ViewManager
Implementation ofViewManager
.
-
-
Field Summary
Fields Modifier and Type Field Description private StatsManager
statsManager
-
Constructor Summary
Constructors Constructor Description ViewManagerImpl(StatsManager statsManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
clearStats()
java.util.Set<View>
getAllExportedViews()
Returns all registered views that should be exported.ViewData
getView(View.Name viewName)
Returns the current stats data,ViewData
, associated with the given view name.void
registerView(View view)
Pull model for stats.(package private) void
resumeStatsCollection()
-
-
-
Field Detail
-
statsManager
private final StatsManager statsManager
-
-
Constructor Detail
-
ViewManagerImpl
ViewManagerImpl(StatsManager statsManager)
-
-
Method Detail
-
registerView
public void registerView(View view)
Description copied from class:ViewManager
Pull model for stats. Registers aView
that will collect data to be accessed viaViewManager.getView(View.Name)
.- Specified by:
registerView
in classViewManager
- Parameters:
view
- theView
to be registered.
-
getView
@Nullable public ViewData getView(View.Name viewName)
Description copied from class:ViewManager
Returns the current stats data,ViewData
, associated with the given view name.Returns
null
if theView
is not registered.- Specified by:
getView
in classViewManager
- Parameters:
viewName
- the name ofView
for the current stats.- Returns:
ViewData
for theView
, ornull
if theView
is not registered.
-
getAllExportedViews
public java.util.Set<View> getAllExportedViews()
Description copied from class:ViewManager
Returns all registered views that should be exported.This method should be used by any stats exporter that automatically exports data for views registered with the
ViewManager
.- Specified by:
getAllExportedViews
in classViewManager
- Returns:
- all registered views that should be exported.
-
clearStats
void clearStats()
-
resumeStatsCollection
void resumeStatsCollection()
-
-