Class ExporterIndexStatsReporter

java.lang.Object
ai.attackframework.tools.burp.sinks.ExporterIndexStatsReporter

public final class ExporterIndexStatsReporter extends Object
Periodically pushes exporter stats snapshots to the Exporter index.

Started when export startup reaches the exporter-stats phase; runs on a single daemon scheduler. Snapshots are emitted only while export is running, the exporter source is enabled, the stats sub-option is selected, and at least one sink is active. The interval is read from RuntimeConfig.exporterStatsIntervalSeconds() so UI changes can reschedule the reporter without restarting the extension.

Delivery is fire-and-forget: failures are not pushed back into the Exporter index to avoid feedback loops. Set ENABLED to false to disable the reporter for diagnostics or focused testing.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    When false, no scheduler is started and no documents are pushed.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Pushes one stats snapshot immediately.
    static void
    Reconciles the scheduler with the current runtime exporter configuration.
    static void
    Starts the periodic stats reporter if not already running.
    static void
    Stops the periodic stats scheduler.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ENABLED

      public static final boolean ENABLED
      When false, no scheduler is started and no documents are pushed.
      See Also:
  • Method Details

    • pushSnapshotNow

      public static void pushSnapshotNow()
      Pushes one stats snapshot immediately.

      Safe to call from any thread. Returns immediately when export is stopped, the exporter stats sub-option is disabled, or no sink is enabled.

    • start

      public static void start()
      Starts the periodic stats reporter if not already running.

      Safe to call from any thread. Uses a single daemon scheduler and the current runtime interval from RuntimeConfig.exporterStatsIntervalSeconds(). Returns immediately when ENABLED is false or exporter stats are disabled.

    • stop

      public static void stop()
      Stops the periodic stats scheduler.

      Safe to call from any thread. The next start() call creates a fresh scheduler.

    • refreshScheduleForCurrentState

      public static void refreshScheduleForCurrentState()
      Reconciles the scheduler with the current runtime exporter configuration.

      Safe to call from any thread. Stops the scheduler when exporter stats are disabled or export is stopped, starts it when newly enabled, and recreates it when the interval changes.