Class ViewData
java.lang.Object
io.opencensus.stats.ViewData
- Direct Known Subclasses:
AutoValue_ViewData
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcheckAggregation(Aggregation aggregation, AggregationData aggregationData, Measure measure) private static voidcheckWindow(View.AggregationWindow window, ViewData.AggregationWindowData windowData) static ViewDatacreate(View view, Map<? extends List<TagValue>, ? extends AggregationData> map, Timestamp start, Timestamp end) Constructs a newViewData.static ViewDatacreate(View view, Map<? extends List<TagValue>, ? extends AggregationData> map, ViewData.AggregationWindowData windowData) Deprecated.in favor ofcreate(View, Map, Timestamp, Timestamp).private static StringcreateErrorMessageForAggregation(Aggregation aggregation, AggregationData aggregationData) private static StringcreateErrorMessageForWindow(View.AggregationWindow window, ViewData.AggregationWindowData windowData) private static ViewDatacreateInternal(View view, Map<List<TagValue>, AggregationData> aggregationMap, ViewData.AggregationWindowData window, Timestamp start, Timestamp end) abstract Map<List<TagValue>, AggregationData> 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.AggregationWindowDataDeprecated.in favor ofgetStart()andgetEnd().private static voidthrowIfAggregationMismatch(boolean isValid, Aggregation aggregation, AggregationData aggregationData) private static voidthrowIfWindowMismatch(boolean isValid, View.AggregationWindow window, ViewData.AggregationWindowData windowData)
-
Constructor Details
-
ViewData
ViewData()
-
-
Method Details
-
getView
-
getAggregationMap
TheAggregationDatagrouped by combination of tag values, associated with thisViewData.- Since:
- 0.8
-
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
-
getEnd
-
create
@Deprecated public static ViewData create(View view, Map<? extends 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:
IllegalArgumentException- if the types ofAggregationandAggregationDatadon't match, or the types ofWindowandWindowDatadon't match.- Since:
- 0.8
-
create
public static ViewData create(View view, Map<? extends 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:
IllegalArgumentException- if the types ofAggregationandAggregationDatadon't match.- Since:
- 0.13
-
createInternal
private static ViewData createInternal(View view, Map<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 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 String createErrorMessageForAggregation(Aggregation aggregation, AggregationData aggregationData)
-
Timestampinstead.