Class ExecutorRegionKit

java.lang.Object
com.iohao.net.common.kit.concurrent.executor.ExecutorRegionKit

public final class ExecutorRegionKit extends Object
The ExecutorRegion utility class functions like a proxy.
Author:
渔民小镇
date:
2024-01-11
  • Method Details

    • getUserThreadExecutor

      public static ThreadExecutor getUserThreadExecutor(long index)
      Get a user thread executor by user index.
      Parameters:
      index - the user identifier used to select an executor
      Returns:
      the ThreadExecutor assigned to the given user index
    • getUserVirtualThreadExecutor

      public static ThreadExecutor getUserVirtualThreadExecutor(long index)
      Get a user virtual thread executor by user index.
      Parameters:
      index - the user identifier used to select a virtual-thread executor
      Returns:
      the ThreadExecutor assigned to the given user index
    • getSimpleThreadExecutor

      public static ThreadExecutor getSimpleThreadExecutor(long index)
      Get a simple thread executor by index.
      Parameters:
      index - the index used to select an executor from the simple region
      Returns:
      the ThreadExecutor mapped to the given index
    • setExecutorRegion

      public static void setExecutorRegion(ExecutorRegion executorRegion)
    • getExecutorRegion

      public static ExecutorRegion getExecutorRegion()