- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for addShutdownHook (0.05 sec)
-
src/test/java/org/codelibs/fess/helper/SystemHelperTest.java
final AtomicReference<Boolean> hookExecuted = new AtomicReference<>(false); systemHelper.addShutdownHook(() -> hookExecuted.set(true)); systemHelper.destroy(); assertTrue(hookExecuted.get()); } public void test_destroy_withException() { systemHelper.addShutdownHook(() -> { throw new RuntimeException("test exception"); }); try {
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Sat Jul 19 23:49:30 UTC 2025 - 28.9K bytes - Viewed (0) -
src/main/java/jcifs/context/AbstractCIFSContext.java
private boolean closed; /** * Default constructor that registers a shutdown hook for cleanup */ public AbstractCIFSContext() { Runtime.getRuntime().addShutdownHook(this); } /** * @param creds the credentials to use * @return a wrapped context with the given credentials */ @Override
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 4K bytes - Viewed (0) -
compat/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java
callerInfo = new NullPointerException().getStackTrace()[2]; Runnable warning = this::maybeWarnAboutCleanUp; cleanupWarning = new Thread(warning); Runtime.getRuntime().addShutdownHook(cleanupWarning); } private void maybeWarnAboutCleanUp() { if (warnAboutCleanup) { System.out.println("[WARNING] TestFileManager from: " + callerInfo.getClassName() + " not cleaned up!");
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 4.7K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/exec/ThumbnailGenerator.java
logger.debug("Destroying LaContainer.."); } destroyContainer(); } }; Runtime.getRuntime().addShutdownHook(shutdownCallback); systemMonitorTask = TimeoutManager.getInstance() .addTimeoutTarget(new SystemMonitorTarget(), ComponentUtil.getFessConfig().getThumbnailSystemMonitorIntervalAsInteger(),
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 9.3K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/exec/SuggestCreator.java
logger.debug("Destroying LaContainer.."); } destroyContainer(); } }; Runtime.getRuntime().addShutdownHook(shutdownCallback); systemMonitorTask = TimeoutManager.getInstance() .addTimeoutTarget(new SystemMonitorTarget(), ComponentUtil.getFessConfig().getSuggestSystemMonitorIntervalAsInteger(),
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 11K bytes - Viewed (0) -
src/main/java/jcifs/util/ResourceManager.java
return t; }; cleanupExecutor = Executors.newSingleThreadScheduledExecutor(threadFactory); // Add shutdown hook for cleanup Runtime.getRuntime().addShutdownHook(new Thread(this::shutdown, "ResourceManager-Shutdown")); startCleanupTask(); } /** * Get the singleton instance * * @return ResourceManager instance */
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 16.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
.testNulls(); } private static class TestApplication extends Application { private final List<Thread> hooks = new ArrayList<>(); @Override synchronized void addShutdownHook(Thread hook) { hooks.add(hook); } synchronized void shutdown() throws InterruptedException { for (Thread hook : hooks) { hook.start(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 28K bytes - Viewed (0) -
src/main/java/jcifs/audit/SecurityAuditLogger.java
eventTimings.put(type, new AtomicLong(0)); } // Start async logging processor startAsyncProcessor(); // Register shutdown hook Runtime.getRuntime().addShutdownHook(new Thread(this::shutdown)); } private void startAsyncProcessor() { logExecutor.submit(() -> { while (!shutdown) { try {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 26.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/exec/Crawler.java
@Override public void run() { destroyContainer(); } }; Runtime.getRuntime().addShutdownHook(shutdownCallback); commandThread = new Thread(() -> { try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) { String command;
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 31K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ServiceManager.java
* // some other action. For now we will just exit. * System.exit(1); * } * }, * MoreExecutors.directExecutor()); * * Runtime.getRuntime().addShutdownHook(new Thread() { * public void run() { * // Give the services 5 seconds to stop to ensure that we are responsive to shutdown * // requests. * try {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 33.2K bytes - Viewed (1)