@Override public void onShutdown() { DelayingShutdownHook logbackHook = new DelayingShutdownHook(); logbackHook.setContext((LoggerContext) LoggerFactory.getILoggerFactory()); logbackHook.run(); }
public void run() { addInfo("Sleeping for "+delay); try { Thread.sleep(delay.getMilliseconds()); } catch (InterruptedException e) { } super.stop(); } }
public void run() { addInfo("Sleeping for "+delay); try { Thread.sleep(delay.getMilliseconds()); } catch (InterruptedException e) { } super.stop(); } }
@Override public void onShutdown() { DelayingShutdownHook logbackHook = new DelayingShutdownHook(); logbackHook.setContext((LoggerContext) LoggerFactory.getILoggerFactory()); logbackHook.run(); }
public void run() { addInfo("Sleeping for "+delay); try { Thread.sleep(delay.getMilliseconds()); } catch (InterruptedException e) { } super.stop(); } }
@Override public void runMayThrow() throws InterruptedException, ExecutionException, IOException { drain(true); if (FBUtilities.isWindows) WindowsTimer.endTimerPeriod(DatabaseDescriptor.getWindowsTimerInterval()); // Cleanup logback DelayingShutdownHook logbackHook = new DelayingShutdownHook(); logbackHook.setContext((LoggerContext)LoggerFactory.getILoggerFactory()); logbackHook.run(); } }, "StorageServiceShutdownHook");