public static class DimValHolder.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
DimValHolder |
build() |
DimValHolder.Builder |
withDimValIndex(Object dimValIndex) |
DimValHolder.Builder |
withDimValue(Comparable dimValue,
ValueType type)
This method is called by
TopNResultBuilder.addEntry(java.lang.Comparable, java.lang.Object, java.lang.Object[]) to store query results. |
DimValHolder.Builder |
withMetricValues(Map<String,Object> metricValues) |
DimValHolder.Builder |
withTopNMetricVal(Object topNMetricVal) |
public DimValHolder.Builder withTopNMetricVal(Object topNMetricVal)
public DimValHolder.Builder withDimValue(Comparable dimValue, ValueType type)
TopNResultBuilder.addEntry(java.lang.Comparable, java.lang.Object, java.lang.Object[]) to store query results.
The method accepts a type argument because Jackson will deserialize numbers as integers instead of longs
if they are small enough. Similarly, type mismatch can arise when using floats when Jackson deserializes
numbers as doubles instead.
This method will ensure that any added dimension value is converted to the expected
type.dimValue - Dimension value from TopNResultBuildertype - Type that dimValue should have, according to the output type of the
DimensionSpec associated with dimValue from the
calling TopNResultBuilderpublic DimValHolder.Builder withDimValIndex(Object dimValIndex)
public DimValHolder.Builder withMetricValues(Map<String,Object> metricValues)
public DimValHolder build()
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.