2121import javax .annotation .concurrent .Immutable ;
2222
2323/**
24- * A ViewDescriptor specifies an aggregation and a set of tag keys. The aggregation will be broken
25- * down by the unique set of matching tag values for each measurement .
24+ * A View specifies an aggregation and a set of tag keys. The aggregation will be broken
25+ * down by the unique set of matching tag values for each measure .
2626 */
2727@ Immutable
28- public abstract class ViewDescriptor {
28+ public abstract class View {
2929 /**
3030 * Name of view. Must be unique.
3131 */
32- public abstract Name getViewDescriptorName ();
32+ public abstract Name getViewName ();
3333
3434 /**
3535 * Name of view, as a {@code String}.
3636 */
3737 public final String getName () {
38- return getViewDescriptorName ().asString ();
38+ return getViewName ().asString ();
3939 }
4040
4141 /**
@@ -44,30 +44,30 @@ public final String getName() {
4444 public abstract String getDescription ();
4545
4646 /**
47- * Measurement type of this view.
47+ * Measure type of this view.
4848 */
4949 public abstract Measure getMeasure ();
5050
5151 /**
52- * Tag keys to match with the associated {@link Measure}. If no keys are specified,
53- * then all stats are recorded. Keys must be unique.
52+ * Dimensions (a.k.a Tag Keys) to match with the associated {@link Measure}.
53+ * If no dimensions are specified, then all stats are recorded. Dimensions must be unique.
5454 *
5555 * <p>Note: The returned list is unmodifiable, attempts to update it will throw an
5656 * UnsupportedOperationException.
5757 */
58- public abstract List <TagKey > getTagKeys ();
58+ public abstract List <TagKey > getDimensions ();
5959
6060 /**
6161 * Applies the given match function to the underlying data type.
6262 */
6363 public abstract <T > T match (
64- Function <DistributionViewDescriptor , T > p0 ,
65- Function <IntervalViewDescriptor , T > p1 );
64+ Function <? super DistributionView , T > p0 ,
65+ Function <? super IntervalView , T > p1 );
6666
6767 /**
68- * The name of a {@code ViewDescriptor }.
68+ * The name of a {@code View }.
6969 */
70- // This type should be used as the key when associating data with ViewDescriptors .
70+ // This type should be used as the key when associating data with Views .
7171 @ Immutable
7272 @ AutoValue
7373 public abstract static class Name {
@@ -82,26 +82,26 @@ public abstract static class Name {
8282 public abstract String asString ();
8383
8484 /**
85- * Creates a {@code ViewDescriptor .Name} from a {@code String}.
85+ * Creates a {@code View .Name} from a {@code String}.
8686 *
8787 * @param name the name {@code String}.
88- * @return a {@code ViewDescriptor .Name} with the given name {@code String}.
88+ * @return a {@code View .Name} with the given name {@code String}.
8989 */
9090 public static Name create (String name ) {
91- return new AutoValue_ViewDescriptor_Name (name );
91+ return new AutoValue_View_Name (name );
9292 }
9393 }
9494
9595 /**
96- * A {@link ViewDescriptor } for distribution-base aggregations.
96+ * A {@link View } for distribution-base aggregations.
9797 */
9898 @ Immutable
9999 @ AutoValue
100- public abstract static class DistributionViewDescriptor extends ViewDescriptor {
100+ public abstract static class DistributionView extends View {
101101 /**
102- * Constructs a new {@link DistributionViewDescriptor }.
102+ * Constructs a new {@link DistributionView }.
103103 */
104- public static DistributionViewDescriptor create (
104+ public static DistributionView create (
105105 String name ,
106106 String description ,
107107 Measure measure ,
@@ -116,15 +116,15 @@ public static DistributionViewDescriptor create(
116116 }
117117
118118 /**
119- * Constructs a new {@link DistributionViewDescriptor }.
119+ * Constructs a new {@link DistributionView }.
120120 */
121- public static DistributionViewDescriptor create (
121+ public static DistributionView create (
122122 Name name ,
123123 String description ,
124124 Measure measure ,
125125 DistributionAggregationDescriptor distributionAggregationDescriptor ,
126126 List <TagKey > tagKeys ) {
127- return new AutoValue_ViewDescriptor_DistributionViewDescriptor (
127+ return new AutoValue_View_DistributionView (
128128 name ,
129129 description ,
130130 measure ,
@@ -134,28 +134,28 @@ public static DistributionViewDescriptor create(
134134
135135 /**
136136 * The {@link DistributionAggregationDescriptor} associated with this
137- * {@link DistributionViewDescriptor }.
137+ * {@link DistributionView }.
138138 */
139139 public abstract DistributionAggregationDescriptor getDistributionAggregationDescriptor ();
140140
141141 @ Override
142142 public <T > T match (
143- Function <DistributionViewDescriptor , T > p0 ,
144- Function <IntervalViewDescriptor , T > p1 ) {
143+ Function <? super DistributionView , T > p0 ,
144+ Function <? super IntervalView , T > p1 ) {
145145 return p0 .apply (this );
146146 }
147147 }
148148
149149 /**
150- * A {@link ViewDescriptor } for interval-based aggregations.
150+ * A {@link View } for interval-based aggregations.
151151 */
152152 @ Immutable
153153 @ AutoValue
154- public abstract static class IntervalViewDescriptor extends ViewDescriptor {
154+ public abstract static class IntervalView extends View {
155155 /**
156- * Constructs a new {@link IntervalViewDescriptor }.
156+ * Constructs a new {@link IntervalView }.
157157 */
158- public static IntervalViewDescriptor create (
158+ public static IntervalView create (
159159 String name ,
160160 String description ,
161161 Measure measure ,
@@ -170,15 +170,15 @@ public static IntervalViewDescriptor create(
170170 }
171171
172172 /**
173- * Constructs a new {@link IntervalViewDescriptor }.
173+ * Constructs a new {@link IntervalView }.
174174 */
175- public static IntervalViewDescriptor create (
175+ public static IntervalView create (
176176 Name name ,
177177 String description ,
178178 Measure measure ,
179179 IntervalAggregationDescriptor intervalAggregationDescriptor ,
180180 List <TagKey > tagKeys ) {
181- return new AutoValue_ViewDescriptor_IntervalViewDescriptor (
181+ return new AutoValue_View_IntervalView (
182182 name ,
183183 description ,
184184 measure ,
@@ -188,14 +188,14 @@ public static IntervalViewDescriptor create(
188188
189189 /**
190190 * The {@link IntervalAggregationDescriptor} associated with this
191- * {@link IntervalViewDescriptor }.
191+ * {@link IntervalView }.
192192 */
193193 public abstract IntervalAggregationDescriptor getIntervalAggregationDescriptor ();
194194
195195 @ Override
196196 public <T > T match (
197- Function <DistributionViewDescriptor , T > p0 ,
198- Function <IntervalViewDescriptor , T > p1 ) {
197+ Function <? super DistributionView , T > p0 ,
198+ Function <? super IntervalView , T > p1 ) {
199199 return p1 .apply (this );
200200 }
201201 }
0 commit comments