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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSimpleThreadExecutor(long index) Get a simple thread executor by index.getUserThreadExecutor(long index) Get a user thread executor by user index.getUserVirtualThreadExecutor(long index) Get a user virtual thread executor by user index.
-
Constructor Details
-
ExecutorRegionKit
public ExecutorRegionKit()
-
-
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
-