Class DefaultResourceStatusDelegate
java.lang.Object
com.inductiveautomation.ignition.gateway.config.DefaultResourceStatusDelegate
- All Implemented Interfaces:
ResourceStatusDelegate
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface ResourceStatusDelegate
NONE -
Constructor Summary
ConstructorsConstructorDescriptionDefaultResourceStatusDelegate(@NonNull List<org.apache.commons.lang3.tuple.Pair<String, String>> categoryMetrics, @NonNull List<org.apache.commons.lang3.tuple.Pair<String, String>> instanceMetrics, @NonNull List<org.apache.commons.lang3.tuple.Pair<String, String>> categoryHealthChecks, @NonNull List<org.apache.commons.lang3.tuple.Pair<String, String>> instanceHealthChecks) -
Method Summary
Modifier and TypeMethodDescriptiongetAllInstanceHealthChecks(Collection<ResourcePath> resources) Health checks for many resources at once.getAllInstanceMetrics(Collection<ResourcePath> resources) Metrics for many resources at once.A set of healthchecks relevant to all resources of this typeA set of diagnostic metrics relevant to all resources of this type.getInstanceHealthChecks(ResourcePath resource) A set of healthchecks relevant to the specific resourcegetInstanceMetrics(ResourcePath resource) A set of diagnostic metrics relevant to the specific resource
-
Constructor Details
-
DefaultResourceStatusDelegate
public DefaultResourceStatusDelegate(@NonNull List<org.apache.commons.lang3.tuple.Pair<String, String>> categoryMetrics, @NonNull List<org.apache.commons.lang3.tuple.Pair<String, String>> instanceMetrics, @NonNull List<org.apache.commons.lang3.tuple.Pair<String, String>> categoryHealthChecks, @NonNull List<org.apache.commons.lang3.tuple.Pair<String, String>> instanceHealthChecks)
-
-
Method Details
-
getCategoryHealthCheckAliases
- Specified by:
getCategoryHealthCheckAliasesin interfaceResourceStatusDelegate
-
getInstanceHealthCheckAliases
- Specified by:
getInstanceHealthCheckAliasesin interfaceResourceStatusDelegate
-
getCategoryMetricAliases
- Specified by:
getCategoryMetricAliasesin interfaceResourceStatusDelegate
-
getInstanceMetricAliases
- Specified by:
getInstanceMetricAliasesin interfaceResourceStatusDelegate
-
getCategoryMetrics
Description copied from interface:ResourceStatusDelegateA set of diagnostic metrics relevant to all resources of this type.- Specified by:
getCategoryMetricsin interfaceResourceStatusDelegate- Returns:
- A set of metrics relevant to all resources of this type
-
getCategoryHealthChecks
Description copied from interface:ResourceStatusDelegateA set of healthchecks relevant to all resources of this type- Specified by:
getCategoryHealthChecksin interfaceResourceStatusDelegate
-
getInstanceHealthChecks
public SortedMap<String, IdentifiedHealthCheckResult> getInstanceHealthChecks(ResourcePath resource) Description copied from interface:ResourceStatusDelegateA set of healthchecks relevant to the specific resource- Specified by:
getInstanceHealthChecksin interfaceResourceStatusDelegate
-
getInstanceMetrics
Description copied from interface:ResourceStatusDelegateA set of diagnostic metrics relevant to the specific resource- Specified by:
getInstanceMetricsin interfaceResourceStatusDelegate- Parameters:
resource- The resource to get metrics for- Returns:
- A set of metrics relevant to the specific resource
-
getAllInstanceHealthChecks
public Map<ResourcePath, SortedMap<String, IdentifiedHealthCheckResult>> getAllInstanceHealthChecks(Collection<ResourcePath> resources) Description copied from interface:ResourceStatusDelegateHealth 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.
- Specified by:
getAllInstanceHealthChecksin interfaceResourceStatusDelegate- 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
public Map<ResourcePath, SortedMap<String, IdentifiedMetric>> getAllInstanceMetrics(Collection<ResourcePath> resources) Description copied from interface:ResourceStatusDelegateMetrics 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
ResourceStatusDelegate.getAllInstanceHealthChecks(Collection): the paths must be of this delegate's resource type, and the type on each path is not checked.- Specified by:
getAllInstanceMetricsin interfaceResourceStatusDelegate- 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.
-