Class StopRequestStore

java.lang.Object
com.knezevic.edaf.v3.persistence.jdbc.StopRequestStore

public final class StopRequestStore extends Object
Persists/queries cooperative stop requests for long-running runs and experiments.

This store is intentionally defensive because stop checks run inside hot optimization loops. A transient persistence failure must never abort the optimization itself. Therefore:

  • SQLite busy conditions are retried with bounded backoff.
  • connection-pool exhaustion is treated as transient and handled fail-open for reads.
  • acknowledgement writes are best effort during shutdown/finalization paths.
  • Constructor Details

    • StopRequestStore

      public StopRequestStore(DataSource dataSource)
  • Method Details

    • isStopRequested

      public boolean isStopRequested(String runId, String experimentId)
      Returns true when a pending stop request exists for run scope or experiment scope.
    • acknowledgeStopRequests

      public int acknowledgeStopRequests(String runId, String experimentId, Instant acknowledgedAt)
      Acknowledges pending run/experiment stop requests consumed by this run.