public synchronized void start ( ) { // use compareAndSet to make sure it starts only once and when not running if ( running . compareAndSet ( false , true ) ) { logger . debug ( "Starting HystrixMetricsPoller" ) ; try { scheduledTask = executor . scheduleWithFixedDelay ( new MetricsPoller ( listener ) , 0 , delay , TimeUnit . MILLISECONDS ) ; } catch ( Throwable ex ) { logger . error ( "Exception while creating the MetricsPoller task" ) ; ex . printStackTrace ( ) ; running . set ( false ) ; } } }
Start polling .