Class SamplingAggregator

    • Constructor Detail

      • SamplingAggregator

        public SamplingAggregator​(String name,
                                  long value,
                                  TimeUnit unit)
    • Method Detail

      • getValue

        public long getValue()
      • 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
      • isAlignStartTime

        public Boolean isAlignStartTime()
      • isAlignEndTime

        public Boolean isAlignEndTime()
      • isAlignSampling

        public Boolean isAlignSampling()
      • getStartTimeAlignmentStartTime

        public long getStartTimeAlignmentStartTime()