Interface MetricCalculation.Builder

  • Method Details

    • calculationComponents

      MetricCalculation.Builder calculationComponents(Collection<CalculationComponent> calculationComponents)

      The list of component metrics referenced in the calculation formula. Each component has an alias used in the formula expression.

      Parameters:
      calculationComponents - The list of component metrics referenced in the calculation formula. Each component has an alias used in the formula expression.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • calculationComponents

      MetricCalculation.Builder calculationComponents(CalculationComponent... calculationComponents)

      The list of component metrics referenced in the calculation formula. Each component has an alias used in the formula expression.

      Parameters:
      calculationComponents - The list of component metrics referenced in the calculation formula. Each component has an alias used in the formula expression.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • calculationComponents

      MetricCalculation.Builder calculationComponents(Consumer<CalculationComponent.Builder>... calculationComponents)

      The list of component metrics referenced in the calculation formula. Each component has an alias used in the formula expression.

      This is a convenience method that creates an instance of the CalculationComponent.Builder avoiding the need to create one manually via CalculationComponent.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to calculationComponents(List<CalculationComponent>).

      Parameters:
      calculationComponents - a consumer that will call methods on CalculationComponent.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • calculation

      MetricCalculation.Builder calculation(String calculation)

      The formula expression that defines how the metric is calculated. Uses component aliases (for example, 100 * SUM(M1) / SUM(M2)).

      Parameters:
      calculation - The formula expression that defines how the metric is calculated. Uses component aliases (for example, 100 * SUM(M1) / SUM(M2)).
      Returns:
      Returns a reference to this object so that method calls can be chained together.