Class ViewManager

java.lang.Object
io.opencensus.stats.ViewManager
Direct Known Subclasses:
NoopStats.NoopViewManager, ViewManagerImpl

public abstract class ViewManager extends Object
Provides facilities to register Views for collecting stats and retrieving stats data as a ViewData.
Since:
0.8
  • Constructor Details

    • ViewManager

      public ViewManager()
  • Method Details

    • registerView

      public abstract void registerView(View view)
      Pull model for stats. Registers a View that will collect data to be accessed via getView(View.Name).
      Parameters:
      view - the View to be registered.
      Since:
      0.8
    • getView

      @Nullable public abstract ViewData getView(View.Name view)
      Returns the current stats data, ViewData, associated with the given view name.

      Returns null if the View is not registered.

      Parameters:
      view - the name of View for the current stats.
      Returns:
      ViewData for the View, or null if the View is not registered.
      Since:
      0.8
    • getAllExportedViews

      public abstract Set<View> getAllExportedViews()
      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.

      Returns:
      all registered views that should be exported.
      Since:
      0.9