Class ThreadService

java.lang.Object
ecmwf.common.technical.ThreadService

public final class ThreadService extends Object
The Class ThreadService.
  • Method Details

    • getCleaningThreadLocalExecutorService

      public static ExecutorService getCleaningThreadLocalExecutorService(int nThreads, boolean useVirtualThreads, boolean daemonThreads)
      Gets the cleaning thread local executor service.
      Parameters:
      nThreads - the n threads
      useVirtualThreads - the use virtual threads
      daemonThreads - the daemon threads
      Returns:
      the executor service
    • getSingleCleaningThreadLocalExecutorService

      public static ExecutorService getSingleCleaningThreadLocalExecutorService(boolean useVirtualThreads, boolean daemonThreads)
      Gets the single cleaning thread local executor service.
      Parameters:
      useVirtualThreads - the use virtual threads
      daemonThreads - the daemon threads
      Returns:
      the executor service
    • setCookieIfNotAlreadySet

      public static boolean setCookieIfNotAlreadySet(String name)
      Sets the cookie if not already set.
      Parameters:
      name - the name
      Returns:
      true, if successful
    • setCookie

      public static void setCookie(String name)
      Sets the cookie.
      Parameters:
      name - the new cookie
    • removeCookie

      public static void removeCookie()
      Removes the cookie.
    • getCookie

      public static String getCookie()
      Gets the cookie.
      Returns:
      the cookie