Interface ReactiveHealthContributors
- All Superinterfaces:
Iterable<ReactiveHealthContributors.Entry>
- All Known Subinterfaces:
CompositeReactiveHealthContributor, ReactiveHealthContributorRegistry
- All Known Implementing Classes:
DefaultReactiveHealthContributorRegistry
A collection of named
reactive health contributors.- Since:
- 4.0.0
- Author:
- Phillip Webb
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA reactive health contributor entry. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ReactiveHealthContributorsadapt(@Nullable HealthContributors contributors) Adapts the givenHealthContributorsinto aReactiveHealthContributorsby scheduling blocking calls toSchedulers.boundedElastic().default HealthContributorsReturn these reactive contributors as standard blockingHealthContributors.@Nullable ReactiveHealthContributorgetContributor(String name) Return the contributor with the given name.default Iterator<ReactiveHealthContributors.Entry> iterator()static ReactiveHealthContributorsof(ReactiveHealthContributors... contributors) Factory method to create a newReactiveHealthContributorsinstance composed of the given contributors.stream()Return a stream of the contributor entries.Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
getContributor
Return the contributor with the given name.- Parameters:
name- the name of the contributor- Returns:
- a contributor instance or
null
-
iterator
- Specified by:
iteratorin interfaceIterable<ReactiveHealthContributors.Entry>
-
stream
Stream<ReactiveHealthContributors.Entry> stream()Return a stream of the contributor entries.- Returns:
- the stream of named contributors
-
asHealthContributors
Return these reactive contributors as standard blockingHealthContributors.- Returns:
- blocking health contributors
-
of
Factory method to create a newReactiveHealthContributorsinstance composed of the given contributors.- Parameters:
contributors- the source contributors in the order they should be combined- Returns:
- a new
ReactiveHealthContributorsinstance
-
adapt
@Contract("!null -> !null") static @Nullable ReactiveHealthContributors adapt(@Nullable HealthContributors contributors) Adapts the givenHealthContributorsinto aReactiveHealthContributorsby scheduling blocking calls toSchedulers.boundedElastic().- Parameters:
contributors- the contributors to adapt ornull- Returns:
- the adapted contributor
- See Also:
-