Class HostMetricsCollector

java.lang.Object
io.fluxzero.sdk.tracking.metrics.host.HostMetricsCollector

public class HostMetricsCollector extends Object
Orchestrates periodic collection and publication of host metrics.

This class manages the lifecycle of host metrics collection, scheduling periodic collections and publishing the results via the MetricsGateway.

  • Constructor Details

  • Method Details

    • start

      public void start()
      Starts periodic metrics collection.

      If already running, this method does nothing.

    • stop

      public void stop()
      Stops metrics collection.

      Cancels any pending scheduled collection. This method is safe to call multiple times.

    • collectAndPublishNow

      public void collectAndPublishNow()
      Manually triggers a metrics collection and publication.

      This method can be used for on-demand metrics collection independent of the periodic schedule.

    • isRunning

      public boolean isRunning()
      Returns whether the collector is currently running.
      Returns:
      true if metrics collection is active