Class SamplingAggregator
- java.lang.Object
-
- org.kairosdb.client.builder.Aggregator
-
- org.kairosdb.client.builder.aggregator.SamplingAggregator
-
- Direct Known Subclasses:
PercentileAggregator
public class SamplingAggregator extends Aggregator
-
-
Constructor Summary
Constructors Constructor Description SamplingAggregator(String name, long value, TimeUnit unit)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object o)longgetStartTimeAlignmentStartTime()TimeUnitgetUnit()longgetValue()inthashCode()BooleanisAlignEndTime()BooleanisAlignSampling()BooleanisAlignStartTime()SamplingAggregatorwithAlignment(Boolean alignStartTime, Boolean alignSampling)Deprecated.SamplingAggregatorwithEndTimeAlignment()Alignment based on the aggregation range rather than the value of the last data point within that range.SamplingAggregatorwithEndTimeAlignment(long startTime)Alignment that starts based on the specified time.SamplingAggregatorwithSamplingAlignment()Alignment based on the sampling size.SamplingAggregatorwithStartTimeAlignment()Alignment based on the aggregation range rather than the value of the first data point within that range.SamplingAggregatorwithStartTimeAlignment(long startTime)Alignment that starts based on the specified time.-
Methods inherited from class org.kairosdb.client.builder.Aggregator
getName
-
-
-
-
Method Detail
-
getValue
public long getValue()
-
getUnit
public TimeUnit getUnit()
-
withSamplingAlignment
public SamplingAggregator withSamplingAlignment()
Alignment based on the sampling size. For example if your sample size is either milliseconds, seconds, minutes or hours then the start of the range will always be at the top of the hour. The effect of setting this to true is that your data will take the same shape when graphed as you refresh the data.
Only one alignment type can be used.
- Returns:
- the SamplingAggregator
-
withStartTimeAlignment
public SamplingAggregator withStartTimeAlignment()
Alignment based on the aggregation range rather than the value of the first data point within that range. Only one alignment type can be used.
- Returns:
- the SamplingAggregator
-
withEndTimeAlignment
public SamplingAggregator withEndTimeAlignment()
Alignment based on the aggregation range rather than the value of the last data point within that range. Only one alignment type can be used.
- Returns:
- the SamplingAggregator
-
withStartTimeAlignment
public SamplingAggregator withStartTimeAlignment(long startTime)
Alignment that starts based on the specified time. For example, if startTime is set to noon today,then alignment starts at noon today.
Only one alignment type can be used.
- Parameters:
startTime- the alignment start time- Returns:
- the SamplingAggregator
-
withEndTimeAlignment
public SamplingAggregator withEndTimeAlignment(long startTime)
Alignment that starts based on the specified time. For example, if startTime is set to noon today,then alignment starts at noon today.
Only one alignment type can be used.
- Parameters:
startTime- the alignment start time- Returns:
- the SamplingAggregator
-
withAlignment
@Deprecated public SamplingAggregator withAlignment(Boolean alignStartTime, Boolean alignSampling)
Deprecated.
-
isAlignStartTime
public Boolean isAlignStartTime()
-
isAlignEndTime
public Boolean isAlignEndTime()
-
isAlignSampling
public Boolean isAlignSampling()
-
getStartTimeAlignmentStartTime
public long getStartTimeAlignmentStartTime()
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAggregator
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAggregator
-
-