Interface StatusAggregator

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 gRPC health.

Since:
4.1.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.
    of(String... order)
    Return a StatusAggregator backed by the given ordered status list.
    of(List<String> order)
    Return a StatusAggregator backed by the given ordered status list.
    of(org.springframework.boot.health.contributor.Status... order)
    Return a StatusAggregator backed by the given ordered status list.
  • Method Details

    • 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
    • of

      static StatusAggregator of(org.springframework.boot.health.contributor.Status... order)
      Return a StatusAggregator backed by the given ordered status list.
      Parameters:
      order - the status order
      Returns:
      a StatusAggregator instance or getDefault() if no order is provided
    • of

      static StatusAggregator of(String... order)
      Return a StatusAggregator backed by the given ordered status list.
      Parameters:
      order - the status order
      Returns:
      a StatusAggregator instance or getDefault() if no order is provided
    • of

      static StatusAggregator of(List<String> order)
      Return a StatusAggregator backed by the given ordered status list.
      Parameters:
      order - the status order
      Returns:
      a StatusAggregator instance or getDefault() if no order is provided
    • getDefault

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