Class OrderedHealthAggregator
- java.lang.Object
- org.springframework.boot.actuate.health.AbstractHealthAggregator
- org.springframework.boot.actuate.health.OrderedHealthAggregator
- All Implemented Interfaces:
HealthAggregator
public class OrderedHealthAggregator extends AbstractHealthAggregator
DefaultHealthAggregator
implementation that aggregatesHealth
instances and determines the final system state based on a simple ordered list.If a different order is required or a new
Status
type will be used, the order can be set by callingsetStatusOrder(List)
.- Since:
- 1.1.0
Constructor Summary
Constructors Constructor Description OrderedHealthAggregator()
Create a newOrderedHealthAggregator
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Status
aggregateStatus(List<Status> candidates)
Return the single 'aggregate' status that should be used from the specified candidates.void
setStatusOrder(List<String> statusOrder)
Set the ordering of the status.void
setStatusOrder(Status... statusOrder)
Set the ordering of the status.Methods inherited from class org.springframework.boot.actuate.health.AbstractHealthAggregator
aggregate, aggregateDetails
Constructor Detail
OrderedHealthAggregator
public OrderedHealthAggregator()
Create a newOrderedHealthAggregator
instance.
Method Detail
setStatusOrder
public void setStatusOrder(Status... statusOrder)
Set the ordering of the status.- Parameters:
statusOrder
- an ordered list of the status
setStatusOrder
public void setStatusOrder(List<String> statusOrder)
Set the ordering of the status.- Parameters:
statusOrder
- an ordered list of the status codes
aggregateStatus
protected Status aggregateStatus(List<Status> candidates)
Description copied from class:AbstractHealthAggregator
Return the single 'aggregate' status that should be used from the specified candidates.- Specified by:
aggregateStatus
in classAbstractHealthAggregator
- Parameters:
candidates
- the candidates- Returns:
- a single status