Class AbstractProbe
-
- All Implemented Interfaces:
-
com.intershop.gradle.icm.utils.Probe
public abstract class AbstractProbe implements Probe
Base class of all Probe implementations.
Takes the ProgressLoggerFactory directly instead of looking it up through a
ServiceRegistryof the owning project or task. Gradle injects that factory into tasks, so a probe no longer has to carry a reference to the build model: holding aProjector aTaskis deprecated at execution time since Gradle 9, fails from Gradle 10 on and cannot be stored by the configuration cache.
-
-
Field Summary
Fields Modifier and Type Field Description private DurationretryIntervalprivate DurationretryTimeout
-
Constructor Summary
Constructors Constructor Description AbstractProbe(ProgressLoggerFactory progressLoggerFactory)
-
Method Summary
Modifier and Type Method Description final DurationgetRetryInterval()final UnitsetRetryInterval(Duration value)final DurationgetRetryTimeout()final UnitsetRetryTimeout(Duration value)ProbeonSuccess(Function1<Unit, Unit> onSuccess)Assigns a callback that is executed when this Probe finishes with a success. ProbeonFailure(Function1<Unit, Unit> onFailure)Assigns a callback that is executed when this Probe finishes with a failure. Booleanexecute()Executes this probe ProbewithRetryInterval(Duration interval)Sets the retry interval ProbewithRetryTimeout(Duration timeout)Sets the retry timeout -
-
Method Detail
-
getRetryInterval
final Duration getRetryInterval()
-
setRetryInterval
final Unit setRetryInterval(Duration value)
-
getRetryTimeout
final Duration getRetryTimeout()
-
setRetryTimeout
final Unit setRetryTimeout(Duration value)
-
onSuccess
Probe onSuccess(Function1<Unit, Unit> onSuccess)
Assigns a callback that is executed when this Probe finishes with a success. The callback is not called for each internal retry attempt.
-
onFailure
Probe onFailure(Function1<Unit, Unit> onFailure)
Assigns a callback that is executed when this Probe finishes with a failure. The callback is not called for each internal retry attempt.
-
withRetryInterval
Probe withRetryInterval(Duration interval)
Sets the retry interval
- Returns:
this Probe
-
withRetryTimeout
Probe withRetryTimeout(Duration timeout)
Sets the retry timeout
- Returns:
this Probe
-
-
-
-