Package com.github.sonus21.rqueue.utils
Class ThreadUtils
java.lang.Object
com.github.sonus21.rqueue.utils.ThreadUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.scheduling.concurrent.ThreadPoolTaskExecutorcreateTaskExecutor(String beanName, String threadPrefix, int corePoolSize, int maxPoolSize, int queueCapacity) static org.springframework.scheduling.concurrent.ThreadPoolTaskSchedulercreateTaskScheduler(int poolSize, String threadPrefix, int terminationTime) static StringgetWorkerName(String name) static voidwaitForTermination(org.slf4j.Logger log, Future<?> future, long waitTimeInMillis, String msg, Object... msgParams) static booleanwaitForWorkerTermination(Collection<QueueThreadPool> queueThreadPools, long waitTime)
-
Method Details
-
createTaskScheduler
public static org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler createTaskScheduler(int poolSize, String threadPrefix, int terminationTime) -
createTaskExecutor
-
waitForTermination
-
waitForWorkerTermination
public static boolean waitForWorkerTermination(Collection<QueueThreadPool> queueThreadPools, long waitTime) -
getWorkerName
-