Class ExporterIndexStatsReporter
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
FieldsModifier and TypeFieldDescriptionstatic final booleanWhen false, no scheduler is started and no documents are pushed. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidPushes one stats snapshot immediately.static voidReconciles the scheduler with the current runtime exporter configuration.static voidstart()Starts the periodic stats reporter if not already running.static voidstop()Stops the periodic stats scheduler.
-
Field Details
-
ENABLED
public static final boolean ENABLEDWhen 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 whenENABLEDisfalseor 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.
-