public abstract class BackoffRunnable extends Object implements Runnable
Runnable that can be delayed depending on the BackoffBarrier of the execution. It can be configured
to execute an outside closure depending on the stability of its internal State.| Constructor and Description |
|---|
BackoffRunnable(BackoffConfiguration configuration,
BackoffBarrier backoffBarrier) |
| Modifier and Type | Method and Description |
|---|---|
com.mulesoft.mule.runtime.gw.api.time.period.Period |
delay() |
protected abstract SessionMetadata |
execute() |
BackoffRunnable |
go()
Delegates its internal
State the execution of the configured closures. |
BackoffRunnable |
ifError(Runnable closure)
|
BackoffRunnable |
ifUnstable(Runnable closure)
|
BackoffRunnable |
otherwise(Runnable closure)
|
void |
run()
Executes this
Runnable once and updates its current State depending on the SessionMetadata obtained
from the execution. |
String |
toString() |
public BackoffRunnable(BackoffConfiguration configuration, BackoffBarrier backoffBarrier)
public void run()
Runnable once and updates its current State depending on the SessionMetadata obtained
from the execution.public BackoffRunnable ifUnstable(Runnable closure)
closure - to execute when Unstable.public BackoffRunnable ifError(Runnable closure)
closure - to execute when Error.public BackoffRunnable otherwise(Runnable closure)
closure - to execute when Stable.public BackoffRunnable go()
State the execution of the configured closures.public com.mulesoft.mule.runtime.gw.api.time.period.Period delay()
Period delay.protected abstract SessionMetadata execute()
Copyright © 2014–2021 MuleSoft, Inc.. All rights reserved.