Class ExecutorRegionKit
java.lang.Object
com.iohao.net.common.kit.concurrent.executor.ExecutorRegionKit
The ExecutorRegion utility class functions like a proxy.
- Author:
- 渔民小镇
- date:
- 2024-01-11
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutorRegionstatic ThreadExecutorgetSimpleThreadExecutor(long index) Get a simple thread executor by index.static ThreadExecutorgetUserThreadExecutor(long index) Get a user thread executor by user index.static ThreadExecutorgetUserVirtualThreadExecutor(long index) Get a user virtual thread executor by user index.static voidsetExecutorRegion(ExecutorRegion executorRegion)
-
Method Details
-
getUserThreadExecutor
Get a user thread executor by user index.- Parameters:
index- the user identifier used to select an executor- Returns:
- the
ThreadExecutorassigned to the given user index
-
getUserVirtualThreadExecutor
Get a user virtual thread executor by user index.- Parameters:
index- the user identifier used to select a virtual-thread executor- Returns:
- the
ThreadExecutorassigned to the given user index
-
getSimpleThreadExecutor
Get a simple thread executor by index.- Parameters:
index- the index used to select an executor from the simple region- Returns:
- the
ThreadExecutormapped to the given index
-
setExecutorRegion
-
getExecutorRegion
-