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.Object
The aggregated data for a particularView
.- Since:
- 0.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ViewData.AggregationWindowData
Deprecated.since 0.13, please use start and endTimestamp
instead.
-
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 void
checkAggregation(Aggregation aggregation, AggregationData aggregationData, Measure measure)
private static void
checkWindow(View.AggregationWindow window, ViewData.AggregationWindowData windowData)
static ViewData
create(View view, java.util.Map<? extends java.util.List<TagValue>,? extends AggregationData> map, Timestamp start, Timestamp end)
Constructs a newViewData
.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)
.private static java.lang.String
createErrorMessageForAggregation(Aggregation aggregation, AggregationData aggregationData)
private static java.lang.String
createErrorMessageForWindow(View.AggregationWindow window, ViewData.AggregationWindowData windowData)
private static ViewData
createInternal(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()
TheAggregationData
grouped by combination of tag values, associated with thisViewData
.abstract Timestamp
getEnd()
Returns the endTimestamp
for aViewData
.abstract Timestamp
getStart()
Returns the startTimestamp
for aViewData
.abstract View
getView()
abstract ViewData.AggregationWindowData
getWindowData()
Deprecated.in favor ofgetStart()
andgetEnd()
.private static void
throwIfAggregationMismatch(boolean isValid, Aggregation aggregation, AggregationData aggregationData)
private static void
throwIfWindowMismatch(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()
TheAggregationData
grouped 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.AggregationWindowData
associated with thisViewData
.ViewData.AggregationWindowData
is 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 startTimestamp
for aViewData
.- Returns:
- the start
Timestamp
. - Since:
- 0.13
-
getEnd
public abstract Timestamp getEnd()
Returns the endTimestamp
for 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
- theView
associated with thisViewData
.map
- the mapping fromTagValue
list toAggregationData
.windowData
- theViewData.AggregationWindowData
.- Returns:
- a
ViewData
. - Throws:
java.lang.IllegalArgumentException
- if the types ofAggregation
andAggregationData
don't match, or the types ofWindow
andWindowData
don'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
- theView
associated with thisViewData
.map
- the mapping fromTagValue
list toAggregationData
.start
- the startTimestamp
for thisViewData
.end
- the endTimestamp
for thisViewData
.- Returns:
- a
ViewData
. - Throws:
java.lang.IllegalArgumentException
- if the types ofAggregation
andAggregationData
don'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)
-
-