public static interface HystrixTimer.TimerListener
Modifier and Type | Method and Description |
---|---|
int |
getIntervalTimeInMilliseconds()
How often this TimerListener should 'tick' defined in milliseconds.
|
void |
tick()
The 'tick' is called each time the interval occurs.
|
void tick()
This method should NOT block or do any work but instead fire its work asynchronously to perform on another thread otherwise it will prevent the Timer from functioning.
This contract is used to keep this implementation single-threaded and simplistic.
If you need a ThreadLocal set, you can store the state in the TimerListener, then when tick() is called, set the ThreadLocal to your desired value.
int getIntervalTimeInMilliseconds()
Copyright © 2016. All Rights Reserved.