Class DiagnosticFlushService
java.lang.Object
io.higson.runtime.diagnostic.flush.DiagnosticFlushService
Drains the
DiagnosticQueue, classifies events by DiagnosticEventCode and routes
each group to a matching DiagnosticEventPersister. Provides retry-with-backoff per group.-
Constructor Summary
ConstructorsConstructorDescriptionDiagnosticFlushService(DiagnosticQueue queue, List<DiagnosticEventPersister<?>> persisters, DiagnosticFlushConfig config) -
Method Summary
Modifier and TypeMethodDescriptionintflush(BooleanSupplier shouldContinue) Drain the queue in batches and persist all events.
-
Constructor Details
-
DiagnosticFlushService
public DiagnosticFlushService(DiagnosticQueue queue, List<DiagnosticEventPersister<?>> persisters, DiagnosticFlushConfig config)
-
-
Method Details
-
flush
Drain the queue in batches and persist all events. TheshouldContinuesupplier is checked between batches to allow graceful early-exit (e.g. on watcher shutdown).- Returns:
- total number of events successfully drained from the queue
-