类 ThreadPoolManager

java.lang.Object
com.alibaba.nacos.common.executor.ThreadPoolManager

public final class ThreadPoolManager extends Object
// TODO Access Metric.

For unified management of thread pool resources, the consumer can simply call the register method to register(String, String, ExecutorService) the thread pool that needs to be included in the life cycle management of the resource

作者:
liaochuntao
  • 方法详细资料

    • getInstance

      public static ThreadPoolManager getInstance()
    • register

      public void register(String namespace, String group, ExecutorService executor)
      Register the thread pool resources with the resource manager.
      参数:
      namespace - namespace name
      group - group name
      executor - ExecutorService
    • deregister

      public void deregister(String namespace, String group)
      Cancel the uniform lifecycle management for all threads under this resource.
      参数:
      namespace - namespace name
      group - group name
    • deregister

      public void deregister(String namespace, String group, ExecutorService executor)
      Undoing the uniform lifecycle management of ExecutorService under this resource.
      参数:
      namespace - namespace name
      group - group name
      executor - ExecutorService
    • destroy

      public void destroy(String namespace)
      Destroys all thread pool resources under this namespace.
      参数:
      namespace - namespace
    • destroy

      public void destroy(String namespace, String group)
      This namespace destroys all thread pool resources under the grouping.
      参数:
      namespace - namespace
      group - group
    • shutdown

      public static void shutdown()
      Shutdown thread pool manager.