R
- the return type of real-method that is being executedpublic interface ExecutionContext<R>
BreakStrategy
or
BreakHandler
.Modifier and Type | Method and Description |
---|---|
<T> T |
getContextAttribute(String name)
Returns value of given context attribute or null of there is no such attribute.
|
Collection<ExecutedTask<R>> |
getExecutionsInProgress()
Returns collection of Tasks which are currently executed by circuit breaker.
|
<U> U |
getUserData()
Returns custom data that could haven been passed to the circuit breaker when executing Task.
|
boolean |
hasContextAttribute(String name)
Return true if context attribute with given name exists.
|
<T> void |
setContextAttribute(String name,
T value)
Creates or sets new value for context attribute with given name.
|
Collection<ExecutedTask<R>> getExecutionsInProgress()
ExecutedTask
.<U> U getUserData()
U
- user custom data passed to the breaker<T> void setContextAttribute(String name, T value)
T
- the type of attribute to setname
- the name under which the attribute will be availablevalue
- the value of the atributeboolean hasContextAttribute(String name)
name
- name of the attribute that might have been set for current execution<T> T getContextAttribute(String name)
T
- the type to which the value of the attribute with given name should be cast toname
- name of the attribute that might have been set for current executionhasContextAttribute(String)
Copyright © 2017. All rights reserved.