com.netflix.hystrix.util
Interface HystrixTimer.TimerListener

Enclosing class:
HystrixTimer

public static interface HystrixTimer.TimerListener


Method Summary
 int getIntervalTimeInMilliseconds()
          How often this TimerListener should 'tick' defined in milliseconds.
 void tick()
          The 'tick' is called each time the interval occurs.
 

Method Detail

tick

void tick()
The 'tick' is called each time the interval occurs.

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.


getIntervalTimeInMilliseconds

int getIntervalTimeInMilliseconds()
How often this TimerListener should 'tick' defined in milliseconds.