Package io.opencensus.stats
Class NoopStats.NoopViewManager
- java.lang.Object
-
- io.opencensus.stats.ViewManager
-
- io.opencensus.stats.NoopStats.NoopViewManager
-
- Enclosing class:
- NoopStats
@ThreadSafe private static final class NoopStats.NoopViewManager extends ViewManager
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<View>exportedViewsprivate java.util.Map<View.Name,View>registeredViewsprivate static TimestampZERO_TIMESTAMP
-
Constructor Summary
Constructors Modifier Constructor Description privateNoopViewManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.Set<View>filterExportedViews(java.util.Collection<View> allViews)java.util.Set<View>getAllExportedViews()Returns all registered views that should be exported.ViewDatagetView(View.Name name)Returns the current stats data,ViewData, associated with the given view name.voidregisterView(View newView)Pull model for stats.
-
-
-
Method Detail
-
registerView
public void registerView(View newView)
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:
newView- theViewto be registered.
-
getView
@Nullable public ViewData getView(View.Name name)
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:
name- 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.
-
-