public class ThreadPoolConfig extends Object
ThreadPoolExecutor| Modifier and Type | Class and Description |
|---|---|
static class |
ThreadPoolConfig.SofaThreadConfigBuilder |
| Constructor and Description |
|---|
ThreadPoolConfig(ThreadPoolConfig.SofaThreadConfigBuilder builder) |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildIdentity(String threadPoolName,
String spaceName)
The generate method of the identity
|
String |
getIdentity()
The unique identity for the thread pool, generate by the threadPoolName and the spaceName
|
long |
getPeriod()
The period to monitor the thread pool
|
String |
getSpaceName()
The spaceName of the thread pool, it's unique
|
long |
getTaskTimeout()
The value to judge whether the task is decayed
|
long |
getTaskTimeoutMilli()
The milli value of the taskTimeout, generate by the taskTimeout and the
TimeUnit |
String |
getThreadPoolName()
The name of the thread pool,it's unique in one spaceName
|
TimeUnit |
getTimeUnit()
The
TimeUnit for the period |
static ThreadPoolConfig.SofaThreadConfigBuilder |
newBuilder() |
void |
setPeriod(long period) |
void |
setSpaceName(String spaceName) |
void |
setTaskTimeout(long taskTimeout) |
void |
setTaskTimeoutMilli(long taskTimeoutMilli) |
void |
setThreadPoolName(String threadPoolName) |
void |
setTimeUnit(TimeUnit timeUnit) |
String |
toString() |
public ThreadPoolConfig(ThreadPoolConfig.SofaThreadConfigBuilder builder)
public static ThreadPoolConfig.SofaThreadConfigBuilder newBuilder()
public String getIdentity()
public String getThreadPoolName()
public String getSpaceName()
public long getTaskTimeout()
public long getPeriod()
public long getTaskTimeoutMilli()
TimeUnitpublic void setThreadPoolName(String threadPoolName)
public void setSpaceName(String spaceName)
public void setTaskTimeout(long taskTimeout)
public void setPeriod(long period)
public void setTimeUnit(TimeUnit timeUnit)
public void setTaskTimeoutMilli(long taskTimeoutMilli)
public static String buildIdentity(String threadPoolName, String spaceName)
Copyright © 2024. All rights reserved.