Files
sailing-analytics/java/com.sap.sailing.polars
Axel Uhl 0f9e3d2655 bug6241: PolarDataService.runWhenPolarLoadingFinishedFor(race, callback)
Adds a way to register a drain-callback on the polar-data loading
pipeline for a specific race without also triggering fresh ingestion of
that race's fixes (which is what raceFinishedLoading does). The new
method may be called any number of times, before or after
raceFinishedLoading, and coordinates with it via a per-miner gate so a
caller never accidentally registers a drain callback while the pipeline
is momentarily idle before this race's fixes have entered it.

PolarDataMiner now maintains:
 - callbacksWaitingForFixIngestion: parked callbacks for races whose
   fixes haven't been queued yet;
 - racesWithIngestedFixes: races whose fixes have been fully queued.

raceFinishedLoading, after queueing all of a race's competitor fixes,
promotes the race into racesWithIngestedFixes and registers all parked
callbacks (plus the caller-supplied one, if any) on the drain.
runWhenPolarLoadingFinishedFor either registers immediately (race
already ingested) or parks the callback for later promotion.

Removed the stale 'TODO bug6241:' comment atop raceFinishedLoading; the
mechanism it sketched is now in place (loading pipeline + drain
callback) so the TODO no longer applies.

This method is the building block that the per-race installation
primitive for the maneuver-based wind estimator (task 14) will
compose with TrackedRace.runWhenPastLoading.
2026-07-14 14:16:42 +02:00
..
2025-08-04 19:50:17 +02:00
…