Package org.fisco.bcos.sdk.utils
Class ThreadPoolService
java.lang.Object
org.fisco.bcos.sdk.utils.ThreadPoolService
public class ThreadPoolService
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Integer
DEFAULT_KEEP_ALIVE_TIME
-
Constructor Summary
Constructors Constructor Description ThreadPoolService(java.lang.String threadName, java.lang.Integer maxBlockingQueueSize)
ThreadPoolService(java.lang.String threadName, java.lang.Integer corePoolSize, java.lang.Integer maxBlockingQueueSize)
ThreadPoolService(java.lang.String threadName, java.lang.Integer corePoolSize, java.lang.Integer maximumPoolSize, java.lang.Integer keepAliveTime, java.lang.Integer maxBlockingQueueSize)
-
Method Summary
Modifier and Type Method Description java.util.concurrent.ExecutorService
getThreadPool()
void
stop()
static void
stopThreadPool(java.util.concurrent.ExecutorService threadPool)
-
Field Details
-
DEFAULT_KEEP_ALIVE_TIME
public static java.lang.Integer DEFAULT_KEEP_ALIVE_TIME
-
-
Constructor Details
-
ThreadPoolService
public ThreadPoolService(java.lang.String threadName, java.lang.Integer maxBlockingQueueSize) -
ThreadPoolService
public ThreadPoolService(java.lang.String threadName, java.lang.Integer corePoolSize, java.lang.Integer maxBlockingQueueSize) -
ThreadPoolService
public ThreadPoolService(java.lang.String threadName, java.lang.Integer corePoolSize, java.lang.Integer maximumPoolSize, java.lang.Integer keepAliveTime, java.lang.Integer maxBlockingQueueSize)
-
-
Method Details
-
getThreadPool
public java.util.concurrent.ExecutorService getThreadPool() -
stop
public void stop() -
stopThreadPool
public static void stopThreadPool(java.util.concurrent.ExecutorService threadPool)
-