Interface SchedulerServiceProviderHolder.SchedulerProvider
-
- Enclosing class:
- SchedulerServiceProviderHolder
public static interface SchedulerServiceProviderHolder.SchedulerProviderProvider for thread pools which allow scheduling capabilities. It is expected that the thread pools entire lifecycle (start to stop) is done through the same provider instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()ThreadPoolExecutorgetBulkScheduler()ScheduledExecutorServicegetFixedSizeScheduler(int minimumThreads, String poolName)DynamicSizedSchedulerInterfacegetScheduler(int minimumThreads, String poolName, int maximumPoolSize)Request to get a scheduler with a minimum number of AVAILABLE threads.ScheduledThreadPoolExecutorgetTimeoutScheduler()Default Timeout scheduler.
-
-
-
Method Detail
-
getScheduler
DynamicSizedSchedulerInterface getScheduler(int minimumThreads, String poolName, int maximumPoolSize)
Request to get a scheduler with a minimum number of AVAILABLE threads.- Parameters:
minimumThreads- Minimum number of available threads for the returned schedulerpoolName- name of pool to identify threadsmaximumPoolSize- maximum pool size- Returns:
- A new scheduler that is ready to accept tasks
-
getFixedSizeScheduler
ScheduledExecutorService getFixedSizeScheduler(int minimumThreads, String poolName)
-
getTimeoutScheduler
ScheduledThreadPoolExecutor getTimeoutScheduler()
Default Timeout scheduler.This is a one Thread fixed sized scheduler. This specific scheduler is using java 1.7 RemoveOnCancelPolicy, so the task are removed from queue permitting to avoid memory consumption [CONJ-297]
- Returns:
- A new scheduler that is ready to accept tasks
-
getBulkScheduler
ThreadPoolExecutor getBulkScheduler()
-
close
void close()
-
-