Class MetricClientImpl

All Implemented Interfaces:
Pageable<Metric>, PageablePost<Metric>, MetricClient<Metric>

public class MetricClientImpl extends ResourceClientBase<Metric, MetricJson> implements MetricClient<Metric>
Internal client for the Fabric Metrics search API (POST /fabric/v4/metrics/search). Standard POST-search paging comes from ResourceClientBase; since MetricJson implements Metric directly, wrap(MetricJson) is the identity.
Author:
ianjones
  • Constructor Details

  • Method Details

    • wrap

      protected Metric wrap(MetricJson json)
      Description copied from class: ResourceClientBase
      Wraps a JSON model into its public model type, binding this client so the returned object can refresh/delete/page itself.
      Specified by:
      wrap in class ResourceClientBase<Metric, MetricJson>
      Parameters:
      json - the deserialized JSON model
      Returns:
      the public model wrapper
    • search

      public Page<MetricJson> search(FilterPropertyList filter, SortPropertyList sort)
      Description copied from interface: MetricClient

      Searches metrics matching the supplied filter and sort criteria.

      Specified by:
      search in interface MetricClient<Metric>
    • getMetricsByName

      public List<Metric> getMetricsByName(String name, String value)
      Description copied from interface: MetricClient
      Retrieves metrics by wildcard metric name (GET /fabric/v4/metrics). Only the wildcard metro metric types are supported by this endpoint (for example equinix.fabric.metro.*.latency). This endpoint does not support time-range filtering.
      Specified by:
      getMetricsByName in interface MetricClient<Metric>
      Parameters:
      name - the wildcard metric name (required)
      value - which value to retrieve (for example last; required)
      Returns:
      the matching metrics