Package io.opencensus.stats
Class ViewData
- java.lang.Object
-
- io.opencensus.stats.ViewData
-
- Direct Known Subclasses:
AutoValue_ViewData
@Immutable public abstract class ViewData extends java.lang.ObjectThe aggregated data for a particularView.- Since:
- 0.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classViewData.AggregationWindowDataDeprecated.since 0.13, please use start and endTimestampinstead.
-
Constructor Summary
Constructors Constructor Description ViewData()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private static voidcheckAggregation(Aggregation aggregation, AggregationData aggregationData, Measure measure)private static voidcheckWindow(View.AggregationWindow window, ViewData.AggregationWindowData windowData)static ViewDatacreate(View view, java.util.Map<? extends java.util.List<TagValue>,? extends AggregationData> map, Timestamp start, Timestamp end)Constructs a newViewData.static ViewDatacreate(View view, java.util.Map<? extends java.util.List<TagValue>,? extends AggregationData> map, ViewData.AggregationWindowData windowData)Deprecated.in favor ofcreate(View, Map, Timestamp, Timestamp).private static java.lang.StringcreateErrorMessageForAggregation(Aggregation aggregation, AggregationData aggregationData)private static java.lang.StringcreateErrorMessageForWindow(View.AggregationWindow window, ViewData.AggregationWindowData windowData)private static ViewDatacreateInternal(View view, java.util.Map<java.util.List<TagValue>,AggregationData> aggregationMap, ViewData.AggregationWindowData window, Timestamp start, Timestamp end)abstract java.util.Map<java.util.List<TagValue>,AggregationData>getAggregationMap()TheAggregationDatagrouped by combination of tag values, associated with thisViewData.abstract TimestampgetEnd()Returns the endTimestampfor aViewData.abstract TimestampgetStart()Returns the startTimestampfor aViewData.abstract ViewgetView()abstract ViewData.AggregationWindowDatagetWindowData()Deprecated.in favor ofgetStart()andgetEnd().private static voidthrowIfAggregationMismatch(boolean isValid, Aggregation aggregation, AggregationData aggregationData)private static voidthrowIfWindowMismatch(boolean isValid, View.AggregationWindow window, ViewData.AggregationWindowData windowData)
-
-
-
Method Detail
-
getView
public abstract View getView()
- Since:
- 0.8
-
getAggregationMap
public abstract java.util.Map<java.util.List<TagValue>,AggregationData> getAggregationMap()
TheAggregationDatagrouped by combination of tag values, associated with thisViewData.- Since:
- 0.8
-
getWindowData
@Deprecated public abstract ViewData.AggregationWindowData getWindowData()
Deprecated.in favor ofgetStart()andgetEnd().Returns theViewData.AggregationWindowDataassociated with thisViewData.ViewData.AggregationWindowDatais deprecated since 0.13, please avoid using this method. UsegetStart()andgetEnd()instead.- Returns:
- the
AggregationWindowData. - Since:
- 0.8
-
getStart
public abstract Timestamp getStart()
Returns the startTimestampfor aViewData.- Returns:
- the start
Timestamp. - Since:
- 0.13
-
getEnd
public abstract Timestamp getEnd()
Returns the endTimestampfor aViewData.- Returns:
- the end
Timestamp. - Since:
- 0.13
-
create
@Deprecated public static ViewData create(View view, java.util.Map<? extends java.util.List<TagValue>,? extends AggregationData> map, ViewData.AggregationWindowData windowData)
Deprecated.in favor ofcreate(View, Map, Timestamp, Timestamp).Constructs a newViewData.- Parameters:
view- theViewassociated with thisViewData.map- the mapping fromTagValuelist toAggregationData.windowData- theViewData.AggregationWindowData.- Returns:
- a
ViewData. - Throws:
java.lang.IllegalArgumentException- if the types ofAggregationandAggregationDatadon't match, or the types ofWindowandWindowDatadon't match.- Since:
- 0.8
-
create
public static ViewData create(View view, java.util.Map<? extends java.util.List<TagValue>,? extends AggregationData> map, Timestamp start, Timestamp end)
Constructs a newViewData.- Parameters:
view- theViewassociated with thisViewData.map- the mapping fromTagValuelist toAggregationData.start- the startTimestampfor thisViewData.end- the endTimestampfor thisViewData.- Returns:
- a
ViewData. - Throws:
java.lang.IllegalArgumentException- if the types ofAggregationandAggregationDatadon't match.- Since:
- 0.13
-
createInternal
private static ViewData createInternal(View view, java.util.Map<java.util.List<TagValue>,AggregationData> aggregationMap, ViewData.AggregationWindowData window, Timestamp start, Timestamp end)
-
checkWindow
private static void checkWindow(View.AggregationWindow window, ViewData.AggregationWindowData windowData)
-
throwIfWindowMismatch
private static void throwIfWindowMismatch(boolean isValid, View.AggregationWindow window, ViewData.AggregationWindowData windowData)
-
createErrorMessageForWindow
private static java.lang.String createErrorMessageForWindow(View.AggregationWindow window, ViewData.AggregationWindowData windowData)
-
checkAggregation
private static void checkAggregation(Aggregation aggregation, AggregationData aggregationData, Measure measure)
-
throwIfAggregationMismatch
private static void throwIfAggregationMismatch(boolean isValid, Aggregation aggregation, AggregationData aggregationData)
-
createErrorMessageForAggregation
private static java.lang.String createErrorMessageForAggregation(Aggregation aggregation, AggregationData aggregationData)
-
-