| Modifier and Type | Field and Description |
|---|---|
protected BackoffBarrier |
backoffBarrier |
protected BackoffConfiguration |
configuration |
protected Optional<Runnable> |
errorClosure |
protected static org.slf4j.Logger |
LOGGER |
protected Optional<Runnable> |
stableClosure |
protected Optional<Runnable> |
unstableClosure |
| Constructor and Description |
|---|
State(BackoffConfiguration configuration,
BackoffBarrier backoffBarrier) |
| Modifier and Type | Method and Description |
|---|---|
abstract com.mulesoft.mule.runtime.gw.api.time.period.Period |
delay() |
abstract State |
go()
Executes the configured closure.
|
State |
ifError(Runnable closure)
|
State |
ifUnstable(Runnable closure)
|
abstract State |
log()
Logs current state.
|
abstract State |
next(SessionMetadata sessionMetadata)
Defines the next state given a
SessionMetadata. |
State |
otherwise(Runnable closure)
|
protected State |
resetClosures() |
protected static final org.slf4j.Logger LOGGER
protected BackoffConfiguration configuration
protected BackoffBarrier backoffBarrier
public State(BackoffConfiguration configuration, BackoffBarrier backoffBarrier)
public abstract State next(SessionMetadata sessionMetadata)
SessionMetadata.sessionMetadata - last SessionMetadata.public abstract com.mulesoft.mule.runtime.gw.api.time.period.Period delay()
Period of delay it represents.public State ifUnstable(Runnable closure)
State is Unstable. If not configured, and empty closure
is defined.closure - to execute.public State ifError(Runnable closure)
State is Error. If not configured, and empty closure is
defined.closure - to execute.public State otherwise(Runnable closure)
State is Stable. If not configured, and empty closure
is defined.closure - to execute.public abstract State go()
public abstract State log()
protected State resetClosures()
Copyright © 2014–2021 MuleSoft, Inc.. All rights reserved.