@Test public void testShutdownWithReferencesDoesNotStopExecutor() throws Exception { Map<String, Object> cache = new HashMap<String, Object>(); ThreadPoolBuilder builder = new ThreadPoolBuilder(name.getTableNameString(), new Configuration(false)); ThreadPoolExecutor exec = ThreadPoolManager.getExecutor(builder, cache); assertNotNull("Got a null exector from the pool!", exec); ThreadPoolExecutor exec2 = ThreadPoolManager.getExecutor(builder, cache); assertTrue("Should have gotten the same executor", exec2 == exec); exec.shutdown(); assertFalse("Executor is shutting down, even though we have a live reference!", exec.isShutdown() || exec.isTerminating()); exec2.shutdown(); assertTrue("Executor is NOT shutting down, after releasing live reference!", exec.awaitTermination(300, TimeUnit.SECONDS)); }
public static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env) { return getExecutor(builder, env.getSharedData()); }
ThreadPoolManager { public static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env) { return getExecutor(builder, env.getSharedData()); } }
ThreadPoolManager { public static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env) { return getExecutor(builder, env.getSharedData()); }  }
ThreadPoolManager { public static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env) { return getExecutor(builder, env.getSharedData()); }  static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder,
      RegionCoprocessorEnvironment env); }
ThreadPoolManager { public static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env) { return getExecutor(builder, env.getSharedData()); }  static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder,
      RegionCoprocessorEnvironment env);  }