Interface ResourceStatusDelegate
- All Known Implementing Classes:
DefaultResourceStatusDelegate
public interface ResourceStatusDelegate
A delegate that provides health checks and metrics for a particular resource type.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault Map<ResourcePath, SortedMap<String, IdentifiedHealthCheckResult>> getAllInstanceHealthChecks(Collection<ResourcePath> resources) Health checks for many resources at once.default Map<ResourcePath, SortedMap<String, IdentifiedMetric>> getAllInstanceMetrics(Collection<ResourcePath> resources) Metrics for many resources at once.default SortedMap<String, IdentifiedHealthCheckResult> A set of healthchecks relevant to all resources of this typedefault SortedMap<String, IdentifiedMetric> A set of diagnostic metrics relevant to all resources of this type.default SortedMap<String, IdentifiedHealthCheckResult> getInstanceHealthChecks(ResourcePath resource) A set of healthchecks relevant to the specific resourcedefault SortedMap<String, IdentifiedMetric> getInstanceMetrics(ResourcePath resource) A set of diagnostic metrics relevant to the specific resource
-
Field Details
-
NONE
-
-
Method Details
-
getCategoryHealthCheckAliases
-
getInstanceHealthCheckAliases
-
getCategoryMetricAliases
-
getInstanceMetricAliases
-
getCategoryHealthChecks
A set of healthchecks relevant to all resources of this type -
getInstanceHealthChecks
default SortedMap<String, IdentifiedHealthCheckResult> getInstanceHealthChecks(ResourcePath resource) A set of healthchecks relevant to the specific resource -
getCategoryMetrics
A set of diagnostic metrics relevant to all resources of this type.- Returns:
- A set of metrics relevant to all resources of this type
-
getInstanceMetrics
A set of diagnostic metrics relevant to the specific resource- Parameters:
resource- The resource to get metrics for- Returns:
- A set of metrics relevant to the specific resource
-
getAllInstanceHealthChecks
default Map<ResourcePath, SortedMap<String, IdentifiedHealthCheckResult>> getAllInstanceHealthChecks(Collection<ResourcePath> resources) Health checks for many resources at once.Gathering a health check runs it, and the default implementation here runs one pass per resource.
Only include paths belonging to this delegate's own resource type. A delegate is bound to one type and identifies a resource by name, so a foreign type yields either nothing or, where this type has a resource of the same name, that resource's results. The type on the path is not checked.
- Parameters:
resources- the resources to gather for, all of this delegate's resource type.- Returns:
- results keyed by
ResourcePath. Every requested path is present, possibly mapping to an empty map.
-
getAllInstanceMetrics
default Map<ResourcePath, SortedMap<String, IdentifiedMetric>> getAllInstanceMetrics(Collection<ResourcePath> resources) Metrics for many resources at once. An implementation backed by the shared registry can snapshot it once for every resource; the default here loops.Carries the same expectation as
getAllInstanceHealthChecks(Collection): the paths must be of this delegate's resource type, and the type on each path is not checked.- Parameters:
resources- the resources to gather for, all of this delegate's resource type.- Returns:
- metrics keyed by
ResourcePath. Every requested path is present, possibly mapping to an empty map.
-