public static HashedWheelTimer newTimer ( final int ticks , final int ticks_per_wheel , final String name ) { class TimerThreadNamer implements ThreadNameDeterminer { @ Override public String determineThreadName ( String currentThreadName , String proposedThreadName ) throws Exception { return "OpenTSDB Timer " + name + " #" + TIMER_ID . incrementAndGet ( ) ; } } return new HashedWheelTimer ( Executors . defaultThreadFactory ( ) , new TimerThreadNamer ( ) , ticks , MILLISECONDS , ticks_per_wheel ) ; }
Returns a new HashedWheelTimer with a name and default ticks