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 StatsManagerstatsManager
-
Constructor Summary
Constructors Constructor Description ViewManagerImpl(StatsManager statsManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidclearStats()java.util.Set<View>getAllExportedViews()Returns all registered views that should be exported.ViewDatagetView(View.Name viewName)Returns the current stats data,ViewData, associated with the given view name.voidregisterView(View view)Pull model for stats.(package private) voidresumeStatsCollection()
-
-
-
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:ViewManagerPull model for stats. Registers aViewthat will collect data to be accessed viaViewManager.getView(View.Name).- Specified by:
registerViewin classViewManager- Parameters:
view- theViewto be registered.
-
getView
@Nullable public ViewData getView(View.Name viewName)
Description copied from class:ViewManagerReturns the current stats data,ViewData, associated with the given view name.Returns
nullif theViewis not registered.- Specified by:
getViewin classViewManager- Parameters:
viewName- the name ofViewfor the current stats.- Returns:
ViewDatafor theView, ornullif theViewis not registered.
-
getAllExportedViews
public java.util.Set<View> getAllExportedViews()
Description copied from class:ViewManagerReturns 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:
getAllExportedViewsin classViewManager- Returns:
- all registered views that should be exported.
-
clearStats
void clearStats()
-
resumeStatsCollection
void resumeStatsCollection()
-
-