Interface ResourceStatusDelegate

All Known Implementing Classes:
DefaultResourceStatusDelegate

public interface ResourceStatusDelegate
A delegate that provides health checks and metrics for a particular resource type.
  • Field Details

  • Method Details

    • getCategoryHealthCheckAliases

      default List<String> getCategoryHealthCheckAliases()
    • getInstanceHealthCheckAliases

      default List<String> getInstanceHealthCheckAliases()
    • getCategoryMetricAliases

      default List<String> getCategoryMetricAliases()
    • getInstanceMetricAliases

      default List<String> getInstanceMetricAliases()
    • getCategoryHealthChecks

      default SortedMap<String, IdentifiedHealthCheckResult> 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

      default SortedMap<String, IdentifiedMetric> 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

      default SortedMap<String, IdentifiedMetric> getInstanceMetrics(ResourcePath resource)
      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.