public class DtpRegistry extends Object implements org.springframework.boot.ApplicationRunner, org.springframework.core.Ordered
| 构造器和说明 |
|---|
DtpRegistry() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ExecutorWrapper |
getCommonExecutor(String name)
Get common ThreadPoolExecutor by name.
|
static DtpExecutor |
getDtpExecutor(String name)
Get Dynamic ThreadPoolExecutor by thread pool name.
|
int |
getOrder() |
static List<String> |
listAllCommonNames()
Get all JUC ThreadPoolExecutor names.
|
static List<String> |
listAllDtpNames()
Get all DtpExecutor names.
|
static void |
refresh(DtpProperties properties)
Refresh while the listening configuration changed.
|
static void |
registerCommon(ExecutorWrapper wrapper,
String source)
Register a common ThreadPoolExecutor.
|
static void |
registerDtp(DtpExecutor executor,
String source)
Register a DtpExecutor.
|
void |
run(org.springframework.boot.ApplicationArguments args) |
void |
setDtpProperties(DtpProperties dtpProperties) |
public static List<String> listAllDtpNames()
public static List<String> listAllCommonNames()
public static void registerDtp(DtpExecutor executor, String source)
executor - the newly created DtpExecutor instancesource - the source of the call to register methodpublic static void registerCommon(ExecutorWrapper wrapper, String source)
wrapper - the newly created ThreadPoolExecutor wrapper instancesource - the source of the call to register methodpublic static DtpExecutor getDtpExecutor(String name)
name - the name of dynamic thread poolpublic static ExecutorWrapper getCommonExecutor(String name)
name - the name of thread poolpublic static void refresh(DtpProperties properties)
properties - the main properties that maintain by config center@Autowired public void setDtpProperties(DtpProperties dtpProperties)
public void run(org.springframework.boot.ApplicationArguments args)
run 在接口中 org.springframework.boot.ApplicationRunnerpublic int getOrder()
getOrder 在接口中 org.springframework.core.OrderedCopyright © 2023. All rights reserved.