T
- public interface HystrixRequestVariableLifecycle<T>
HystrixRequestVariable
.Modifier and Type | Method and Description |
---|---|
T |
initialValue()
Invoked when
HystrixRequestVariable.get() is first called. |
void |
shutdown(T value)
Invoked when request scope is shutdown to allow for cleanup.
|
T initialValue()
HystrixRequestVariable.get()
is first called.
When using the default implementation this is invoked when HystrixRequestVariableDefault.get()
is called.
void shutdown(T value)
When using the default implementation this is invoked when HystrixRequestContext.shutdown()
is called.
The HystrixRequestVariable.get()
method should not be called from within this method as it will result in initialValue()
being called again.
value
- of request variable to allow cleanup activity.
If nothing needs to be cleaned up then nothing needs to be done in this method.