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.Object
A 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 class
View.AggregationWindow
Deprecated.since 0.13.static class
View.Name
The name of aView
.
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
NAME_MAX_LENGTH
private 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 View
create(View.Name name, java.lang.String description, Measure measure, Aggregation aggregation, java.util.List<TagKey> columns)
Constructs a newView
.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)
.abstract Aggregation
getAggregation()
TheAggregation
associated with thisView
.abstract java.util.List<TagKey>
getColumns()
Columns (a.k.a Tag Keys) to match with the associatedMeasure
.abstract java.lang.String
getDescription()
More detailed description, for documentation purposes.abstract Measure
getMeasure()
Measure type of this view.abstract View.Name
getName()
Name of view.abstract View.AggregationWindow
getWindow()
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()
TheAggregation
associated with thisView
.- Since:
- 0.8
-
getColumns
public abstract java.util.List<TagKey> getColumns()
Columns (a.k.a Tag Keys) to match with the associatedMeasure
.Measure
will 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 allView
s will be cumulative.Returns the timeView.AggregationWindow
for 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.Name
of view. Must be unique.description
- the description of view.measure
- theMeasure
to be aggregated by this view.aggregation
- the basicAggregation
that this view will support.columns
- theTagKey
s that this view will aggregate on. Columns should not contain duplicates.window
- theView.AggregationWindow
of 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.Name
of view. Must be unique.description
- the description of view.measure
- theMeasure
to be aggregated by this view.aggregation
- the basicAggregation
that this view will support.columns
- theTagKey
s that this view will aggregate on. Columns should not contain duplicates.- Returns:
- a new
View
. - Since:
- 0.13
-
-