Interface ResultProcessingDelayMonitor

All Known Implementing Classes:
ResultProcessingDelayMonitorImpl

@Internal public interface ResultProcessingDelayMonitor
Service that keeps track of result processing times.
  • Method Details

    • registerProcessingFinished

      void registerProcessingFinished(@NotNull @NotNull ResultKey resultKey)
      Called when result processing is finished normally.
      Parameters:
      resultKey -
    • registerIncomingResult

      void registerIncomingResult(@NotNull @NotNull ResultKey resultKey)
      Called by agent to indicate a result is incoming.
      Parameters:
      resultKey -
    • onTerminateResult

      void onTerminateResult(@NotNull @NotNull ResultKey resultKey)
      Called when result processing is finished, regardless of state.
      Parameters:
      resultKey -
    • isResultArrivalExpected

      boolean isResultArrivalExpected(@NotNull @NotNull ResultKey resultKey)
      Checks if agent notified that the result is coming and if the time since that event exceeded threshold.
      Parameters:
      resultKey -
      Returns:
      true if the service has a record of the result and the wait time is not exceeded.
    • getProcessingDelayEstimate

      @NotNull @NotNull Duration getProcessingDelayEstimate()
      Current estimate of the result processing time.
      Returns:
      an estimate of the result processing time.
    • getNumberOfIncomingResults

      long getNumberOfIncomingResults()
      Current number of results registered as incoming but not yet processed
      Returns:
      number of results registered as incoming but not yet processed
    • getIncomingResults

      List<ResultKey> getIncomingResults()
    • purgeStaleEntries

      void purgeStaleEntries(@NotNull @NotNull Predicate<ResultKey> isStale)
      Purges entries older than the time specified internally (1h) by the service iff they fulfill given predicate. (Actual use: check if entry is present in CBC or DeploymentInProgress)