Package io.opencensus.stats
Class View
- java.lang.Object
-
- io.opencensus.stats.View
-
- Direct Known Subclasses:
AutoValue_View
@Immutable public abstract class View extends java.lang.ObjectA View specifies an aggregation and a set of tag keys. The aggregation will be broken down by the unique set of matching tag values for each measure.- Since:
- 0.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classView.AggregationWindowDeprecated.since 0.13.static classView.NameThe name of aView.
-
Field Summary
Fields Modifier and Type Field Description (package private) static intNAME_MAX_LENGTHprivate static java.util.Comparator<TagKey>TAG_KEY_COMPARATOR
-
Constructor Summary
Constructors Constructor Description View()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Viewcreate(View.Name name, java.lang.String description, Measure measure, Aggregation aggregation, java.util.List<TagKey> columns)Constructs a newView.static Viewcreate(View.Name name, java.lang.String description, Measure measure, Aggregation aggregation, java.util.List<TagKey> columns, View.AggregationWindow window)Deprecated.in favor ofcreate(Name, String, Measure, Aggregation, List).abstract AggregationgetAggregation()TheAggregationassociated with thisView.abstract java.util.List<TagKey>getColumns()Columns (a.k.a Tag Keys) to match with the associatedMeasure.abstract java.lang.StringgetDescription()More detailed description, for documentation purposes.abstract MeasuregetMeasure()Measure type of this view.abstract View.NamegetName()Name of view.abstract View.AggregationWindowgetWindow()Deprecated.since 0.13.
-
-
-
Field Detail
-
NAME_MAX_LENGTH
static final int NAME_MAX_LENGTH
- See Also:
- Constant Field Values
-
TAG_KEY_COMPARATOR
private static final java.util.Comparator<TagKey> TAG_KEY_COMPARATOR
-
-
Method Detail
-
getName
public abstract View.Name getName()
Name of view. Must be unique.- Since:
- 0.8
-
getDescription
public abstract java.lang.String getDescription()
More detailed description, for documentation purposes.- Since:
- 0.8
-
getMeasure
public abstract Measure getMeasure()
Measure type of this view.- Since:
- 0.8
-
getAggregation
public abstract Aggregation getAggregation()
TheAggregationassociated with thisView.- Since:
- 0.8
-
getColumns
public abstract java.util.List<TagKey> getColumns()
Columns (a.k.a Tag Keys) to match with the associatedMeasure.Measurewill be recorded in a "greedy" way. That is, every view aggregates every measure. This is similar to doing a GROUPBY on view’s columns. Columns must be unique.- Since:
- 0.8
-
getWindow
@Deprecated public abstract View.AggregationWindow getWindow()
Deprecated.since 0.13. In the future allViews will be cumulative.Returns the timeView.AggregationWindowfor thisView.- Returns:
- the time
View.AggregationWindow. - Since:
- 0.8
-
create
@Deprecated public static View create(View.Name name, java.lang.String description, Measure measure, Aggregation aggregation, java.util.List<TagKey> columns, View.AggregationWindow window)
Deprecated.in favor ofcreate(Name, String, Measure, Aggregation, List).Constructs a newView.- Parameters:
name- theView.Nameof view. Must be unique.description- the description of view.measure- theMeasureto be aggregated by this view.aggregation- the basicAggregationthat this view will support.columns- theTagKeys that this view will aggregate on. Columns should not contain duplicates.window- theView.AggregationWindowof view.- Returns:
- a new
View. - Since:
- 0.8
-
create
public static View create(View.Name name, java.lang.String description, Measure measure, Aggregation aggregation, java.util.List<TagKey> columns)
Constructs a newView.- Parameters:
name- theView.Nameof view. Must be unique.description- the description of view.measure- theMeasureto be aggregated by this view.aggregation- the basicAggregationthat this view will support.columns- theTagKeys that this view will aggregate on. Columns should not contain duplicates.- Returns:
- a new
View. - Since:
- 0.13
-
-