test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/util/HystrixTimerTest.java
test_class.identifier: HystrixTimerTest
test_case.body: @Test
      public void testReset() {
          HystrixTimer timer = HystrixTimer.getInstance();
          TestListener l1 = new TestListener(50, "A");
          timer.addTimerListener(l1);
  
          ScheduledExecutor ex = timer.executor.get();
  
          assertFalse(ex.executor.isShutdown());
  
          // perform reset which should shut it down
          HystrixTimer.reset();
  
          assertTrue(ex.executor.isShutdown());
          assertNull(timer.executor.get());
  
          // assert it starts up again on use
          TestListener l2 = new TestListener(50, "A");
          timer.addTimerListener(l2);
  
          ScheduledExecutor ex2 = timer.executor.get();
  
          assertFalse(ex2.executor.isShutdown());
  
          // reset again to shutdown what we just started
          HystrixTimer.reset();
          // try resetting again to make sure it's idempotent (ie. doesn't blow up on an NPE)
          HystrixTimer.reset();
      }
test_case.class_method_signature: HystrixTimerTest.testReset()
test_case.full_signature: @Test public void testReset()
test_case.identifier: testReset
test_case.invocations: getInstance addTimerListener get assertFalse isShutdown reset assertTrue isShutdown assertNull get addTimerListener get assertFalse isShutdown reset reset
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReset()
focal_class.declarator: logger = LoggerFactory.getLogger(HystrixTimer.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(HystrixTimer.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: INSTANCE = new HystrixTimer()
focal_class.modifier: private static
focal_class.original_string: private static HystrixTimer INSTANCE = new HystrixTimer();
focal_class.type: HystrixTimer
focal_class.var_name: INSTANCE
focal_class.declarator: executor = new AtomicReference<ScheduledExecutor>()
focal_class.original_string: AtomicReference<ScheduledExecutor> executor = new AtomicReference<ScheduledExecutor>();
focal_class.type: AtomicReference<ScheduledExecutor>
focal_class.var_name: executor
focal_class.file: hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixTimer.java
focal_class.identifier: HystrixTimer
focal_class.class_method_signature: HystrixTimer.HystrixTimer()
focal_class.full_signature: private  HystrixTimer()
focal_class.identifier: HystrixTimer
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  HystrixTimer()
focal_class.class_method_signature: HystrixTimer.getInstance()
focal_class.full_signature: public static HystrixTimer getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: HystrixTimer
focal_class.signature: HystrixTimer getInstance()
focal_class.class_method_signature: HystrixTimer.reset()
focal_class.full_signature: public static void reset()
focal_class.identifier: reset
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: HystrixTimer.addTimerListener(final TimerListener listener)
focal_class.full_signature: public Reference<TimerListener> addTimerListener(final TimerListener listener)
focal_class.identifier: addTimerListener
focal_class.modifiers: public
focal_class.parameters: (final TimerListener listener)
focal_class.return: Reference<TimerListener>
focal_class.signature: Reference<TimerListener> addTimerListener(final TimerListener listener)
focal_class.class_method_signature: HystrixTimer.startThreadIfNeeded()
focal_class.full_signature: protected void startThreadIfNeeded()
focal_class.identifier: startThreadIfNeeded
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startThreadIfNeeded()
focal_method.body: public static void reset() {
          ScheduledExecutor ex = INSTANCE.executor.getAndSet(null);
          if (ex != null && ex.getThreadPool() != null) {
              ex.getThreadPool().shutdownNow();
          }
      }
focal_method.class_method_signature: HystrixTimer.reset()
focal_method.full_signature: public static void reset()
focal_method.identifier: reset
focal_method.invocations: getAndSet getThreadPool shutdownNow getThreadPool
focal_method.modifiers: public static
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void reset()