Interface ControlPlaneMonitorService


  • public interface ControlPlaneMonitorService
    Control Plane Statistics Service Interface.
    • Method Detail

      • updateMetric

        void updateMetric​(ControlMetric controlMetric,
                          int updateIntervalInMinutes,
                          java.util.Optional<DeviceId> deviceId)
        Adds a new control metric value with a certain update interval.
        Parameters:
        controlMetric - control plane metric (e.g., control message rate, cpu, memory, etc.)
        updateIntervalInMinutes - value update interval (in minute)
        deviceId - device identifier
      • updateMetric

        void updateMetric​(ControlMetric controlMetric,
                          int updateIntervalInMinutes,
                          java.lang.String resourceName)
        Adds a new control metric value with a certain update interval.
        Parameters:
        controlMetric - control plane metric (e.g., disk and network metrics)
        updateIntervalInMinutes - value update interval (in minute)
        resourceName - resource name
      • getLoad

        java.util.concurrent.CompletableFuture<ControlLoadSnapshot> getLoad​(NodeId nodeId,
                                                                            ControlMetricType type,
                                                                            java.util.Optional<DeviceId> deviceId)
        Obtains snapshot of control plane load of a specific device. The metrics range from control messages and system metrics (e.g., CPU and memory info). If the device id is not specified, it returns system metrics, otherwise, it returns control message stats of the given device.
        Parameters:
        nodeId - node identifier
        type - control metric type
        deviceId - device identifier
        Returns:
        completable future object of control load snapshot
      • getLoadSync

        default ControlLoadSnapshot getLoadSync​(NodeId nodeId,
                                                ControlMetricType type,
                                                java.util.Optional<DeviceId> deviceId)
        Synchronous version of getLoad. Obtains snapshot of control plane load of a specific device. The metrics range from control messages and system metrics (e.g., CPU and memory info). If the device id is not specified, it returns system metrics, otherwise, it returns control message stats of the given device.
        Parameters:
        nodeId - node identifier
        type - control metric type
        deviceId - device identifier
        Returns:
        control load snapshot
      • getLoad

        java.util.concurrent.CompletableFuture<ControlLoadSnapshot> getLoad​(NodeId nodeId,
                                                                            ControlMetricType type,
                                                                            java.lang.String resourceName)
        Obtains snapshot of control plane load of a specific resource. The metrics include I/O device metrics (e.g., disk and network metrics).
        Parameters:
        nodeId - node identifier
        type - control metric type
        resourceName - resource name
        Returns:
        completable future object of control load snapshot
      • getLoadSync

        default ControlLoadSnapshot getLoadSync​(NodeId nodeId,
                                                ControlMetricType type,
                                                java.lang.String resourceName)
        Synchronous version of getLoad. Obtains snapshot of control plane load of a specific resource. The metrics include I/O device metrics (e.g., disk and network metrics).
        Parameters:
        nodeId - node identifier
        type - control metric type
        resourceName - resource name
        Returns:
        control load snapshot
      • getLoad

        java.util.concurrent.CompletableFuture<ControlLoadSnapshot> getLoad​(NodeId nodeId,
                                                                            ControlMetricType type,
                                                                            int duration,
                                                                            java.util.concurrent.TimeUnit unit,
                                                                            java.util.Optional<DeviceId> deviceId)
        Obtains snapshot of control plane load of a specific device with the projected range.
        Parameters:
        nodeId - node identifier
        type - control metric type
        duration - projected duration
        unit - projected time unit
        deviceId - device identifier
        Returns:
        completable future object of control load snapshot
      • getLoadSync

        default ControlLoadSnapshot getLoadSync​(NodeId nodeId,
                                                ControlMetricType type,
                                                int duration,
                                                java.util.concurrent.TimeUnit unit,
                                                java.util.Optional<DeviceId> deviceId)
        Synchronous version of getLoad. Obtains snapshot of control plane load of a specific device with the projected range.
        Parameters:
        nodeId - node identifier
        type - control metric type
        duration - projected duration
        unit - projected time unit
        deviceId - device identifier
        Returns:
        control load snapshot
      • getLoad

        java.util.concurrent.CompletableFuture<ControlLoadSnapshot> getLoad​(NodeId nodeId,
                                                                            ControlMetricType type,
                                                                            int duration,
                                                                            java.util.concurrent.TimeUnit unit,
                                                                            java.lang.String resourceName)
        Obtains snapshot of control plane load of a specific resource with the projected range.
        Parameters:
        nodeId - node identifier
        type - control metric type
        duration - projected duration
        unit - projected time unit
        resourceName - resource name
        Returns:
        completable future object of control load snapshot
      • getLoadSync

        default ControlLoadSnapshot getLoadSync​(NodeId nodeId,
                                                ControlMetricType type,
                                                int duration,
                                                java.util.concurrent.TimeUnit unit,
                                                java.lang.String resourceName)
        Synchronous version of getLoad. Obtains snapshot of control plane load of a specific resource with the projected range.
        Parameters:
        nodeId - node identifier
        type - control metric type
        duration - projected duration
        unit - projected time unit
        resourceName - resource name
        Returns:
        control load snapshot
      • availableResources

        java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>> availableResources​(NodeId nodeId,
                                                                                                   ControlResource.Type resourceType)
        Obtains a list of names of available resources.
        Parameters:
        nodeId - node identifier
        resourceType - resource type
        Returns:
        completable future object of a collection of available resource names
      • availableResourcesSync

        default java.util.Set<java.lang.String> availableResourcesSync​(NodeId nodeId,
                                                                       ControlResource.Type resourceType)
        Synchronous version of availableResource. Obtains a list of names of available resources.
        Parameters:
        nodeId - node identifier
        resourceType - resource type
        Returns:
        a collection of available resource names