@Override public void remove(CriticalComponent component) { components.remove(component); }
/** * it will lookup for process that are dead already, eliminating leaks. */ public static void cleanupProcess() { for (Process p : processes) { // if (!p.isAlive()) { processes.remove(p); } } }
@Override public void remove(CriticalComponent component) { components.remove(component); }
@Override public void remove(CriticalComponent component) { components.remove(component); }
@Override public void remove(CriticalComponent component) { components.remove(component); }
/** * it will lookup for process that are dead already, eliminating leaks. */ public static void cleanupProcess() { for (Process p : processes) { // if (!p.isAlive()) { processes.remove(p); } } }
@Override public void remove(CriticalComponent component) { components.remove(component); }
@Override public void remove(CriticalComponent component) { components.remove(component); }
@Override public void remove(CriticalComponent component) { components.remove(component); }
private void awaitLatch(CountDownLatch latch, int timeout) throws InterruptedException { try { if (timeout < 0) { latch.await(); } else { latch.await(timeout, TimeUnit.SECONDS); } // in case of an interrupted server, we need to make sure we don't proceed on anything if (state == JournalState.STOPPED) { throw new RuntimeException("Server is not started"); } } finally { latches.remove(latch); } }
private void awaitLatch(CountDownLatch latch, int timeout) throws InterruptedException { try { if (timeout < 0) { latch.await(); } else { latch.await(timeout, TimeUnit.SECONDS); } // in case of an interrupted server, we need to make sure we don't proceed on anything if (state == JournalState.STOPPED) { throw new RuntimeException("Server is not started"); } } finally { latches.remove(latch); } }
} finally { if (notification != null) { pendingNotifications.remove(notification);