Class ConcurrencyUtil

java.lang.Object
org.opencastproject.oaipmh.util.ConcurrencyUtil

public final class ConcurrencyUtil extends Object
Functions dealing with concurrency.
  • Method Details

    • shutdownAndAwaitTermination

      public static void shutdownAndAwaitTermination(ExecutorService exe, int waitSeconds, org.opencastproject.util.data.Function0<Void> executorDoesNotTerminate)
      Gently shut down an executor service. Waits for waitSeconds then tries to forcibly terminate the service. Waits again then calls executorDoesNotTerminate.