Class ResultProcessingDelayMonitorImpl
java.lang.Object
com.atlassian.bamboo.build.monitoring.ResultProcessingDelayMonitorImpl
- All Implemented Interfaces:
ResultProcessingDelayMonitor
public class ResultProcessingDelayMonitorImpl
extends Object
implements ResultProcessingDelayMonitor
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
ResultProcessingDelayMonitorImpl
public ResultProcessingDelayMonitorImpl()
-
-
Method Details
-
registerProcessingFinished
Description copied from interface:ResultProcessingDelayMonitorCalled when result processing is finished normally.- Specified by:
registerProcessingFinishedin interfaceResultProcessingDelayMonitor- Parameters:
resultKey-
-
registerIncomingResult
Description copied from interface:ResultProcessingDelayMonitorCalled by agent to indicate a result is incoming.- Specified by:
registerIncomingResultin interfaceResultProcessingDelayMonitor- Parameters:
resultKey-
-
onTerminateResult
Description copied from interface:ResultProcessingDelayMonitorCalled when result processing is finished, regardless of state.- Specified by:
onTerminateResultin interfaceResultProcessingDelayMonitor- Parameters:
resultKey-
-
isResultArrivalExpected
Description copied from interface:ResultProcessingDelayMonitorChecks if agent notified that the result is coming and if the time since that event exceeded threshold.- Specified by:
isResultArrivalExpectedin interfaceResultProcessingDelayMonitor- Parameters:
resultKey-- Returns:
- true if the service has a record of the result and the wait time is not exceeded.
-
getProcessingDelayEstimate
Description copied from interface:ResultProcessingDelayMonitorCurrent estimate of the result processing time.- Specified by:
getProcessingDelayEstimatein interfaceResultProcessingDelayMonitor- Returns:
- an estimate of the result processing time.
-
getNumberOfIncomingResults
public long getNumberOfIncomingResults()Description copied from interface:ResultProcessingDelayMonitorCurrent number of results registered as incoming but not yet processed- Specified by:
getNumberOfIncomingResultsin interfaceResultProcessingDelayMonitor- Returns:
- number of results registered as incoming but not yet processed
-
getIncomingResults
- Specified by:
getIncomingResultsin interfaceResultProcessingDelayMonitor
-
purgeStaleEntries
Description copied from interface:ResultProcessingDelayMonitorPurges 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)- Specified by:
purgeStaleEntriesin interfaceResultProcessingDelayMonitor
-