Interface StatusAggregator

All Known Implementing Classes:
SimpleStatusAggregator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StatusAggregator
Strategy used to aggregate Status instances.

This is required in order to combine subsystem states expressed through Health.getStatus() into one state for the entire system.

Since:
2.2.0
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.boot.health.contributor.Status
    getAggregateStatus(Set<org.springframework.boot.health.contributor.Status> statuses)
    Return the aggregate status for the given set of statuses.
    default org.springframework.boot.health.contributor.Status
    getAggregateStatus(org.springframework.boot.health.contributor.Status... statuses)
    Return the aggregate status for the given set of statuses.
    Return StatusAggregator instance using default ordering rules.
  • Method Details

    • getDefault

      static StatusAggregator getDefault()
      Return StatusAggregator instance using default ordering rules.
      Returns:
      a StatusAggregator with default ordering rules.
      Since:
      2.3.0
    • getAggregateStatus

      default org.springframework.boot.health.contributor.Status getAggregateStatus(org.springframework.boot.health.contributor.Status... statuses)
      Return the aggregate status for the given set of statuses.
      Parameters:
      statuses - the statuses to aggregate
      Returns:
      the aggregate status
    • getAggregateStatus

      org.springframework.boot.health.contributor.Status getAggregateStatus(Set<org.springframework.boot.health.contributor.Status> statuses)
      Return the aggregate status for the given set of statuses.
      Parameters:
      statuses - the statuses to aggregate
      Returns:
      the aggregate status