Interface ResultProcessingDelayMonitor
- All Known Implementing Classes:
ResultProcessingDelayMonitorImpl
@Internal
public interface ResultProcessingDelayMonitor
Service that keeps track of result processing times.
-
Method Summary
Modifier and TypeMethodDescriptionlongCurrent number of results registered as incoming but not yet processed@NotNull DurationCurrent estimate of the result processing time.booleanisResultArrivalExpected(@NotNull ResultKey resultKey) Checks if agent notified that the result is coming and if the time since that event exceeded threshold.voidonTerminateResult(@NotNull ResultKey resultKey) Called when result processing is finished, regardless of state.voidpurgeStaleEntries(@NotNull Predicate<ResultKey> isStale) Purges entries older than the time specified internally (1h) by the service iff they fulfill given predicate.voidregisterIncomingResult(@NotNull ResultKey resultKey) Called by agent to indicate a result is incoming.voidregisterProcessingFinished(@NotNull ResultKey resultKey) Called when result processing is finished normally.
-
Method Details
-
registerProcessingFinished
Called when result processing is finished normally.- Parameters:
resultKey-
-
registerIncomingResult
Called by agent to indicate a result is incoming.- Parameters:
resultKey-
-
onTerminateResult
Called when result processing is finished, regardless of state.- Parameters:
resultKey-
-
isResultArrivalExpected
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
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
-
purgeStaleEntries
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)
-