Package org.opencastproject.oaipmh.util
Class ConcurrencyUtil
java.lang.Object
org.opencastproject.oaipmh.util.ConcurrencyUtil
Functions dealing with concurrency.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidshutdownAndAwaitTermination(ExecutorService exe, int waitSeconds, Runnable executorDoesNotTerminate) Gently shut down an executor service.
-
Method Details
-
shutdownAndAwaitTermination
public static void shutdownAndAwaitTermination(ExecutorService exe, int waitSeconds, Runnable executorDoesNotTerminate) Gently shut down an executor service. Waits forwaitSecondsthen tries to forcibly terminate the service. Waits again then callsexecutorDoesNotTerminate.
-