ExecutorServiceManager instead, will be removed in a future Camel release@Deprecated public interface ExecutorServiceStrategy extends ShutdownableService
CamelContext is shutting down.| Modifier and Type | Method and Description |
|---|---|
ThreadPoolProfile |
getDefaultThreadPoolProfile()
Deprecated.
Gets the default thread pool profile
|
String |
getThreadName(String name)
Deprecated.
Creates a full thread name
|
String |
getThreadNamePattern()
Deprecated.
Gets the thread name pattern used for creating the full thread name.
|
ThreadPoolProfile |
getThreadPoolProfile(String id)
Deprecated.
Gets the thread pool profile by the given id
|
ExecutorService |
lookup(Object source,
String name,
String executorServiceRef)
Deprecated.
|
ScheduledExecutorService |
lookupScheduled(Object source,
String name,
String executorServiceRef)
Deprecated.
|
ExecutorService |
newCachedThreadPool(Object source,
String name)
Deprecated.
Creates a new cached thread pool.
|
ExecutorService |
newDefaultThreadPool(Object source,
String name)
Deprecated.
Creates a new thread pool using the default thread pool profile.
|
ExecutorService |
newFixedThreadPool(Object source,
String name,
int poolSize)
Deprecated.
Creates a new fixed thread pool.
|
ScheduledExecutorService |
newScheduledThreadPool(Object source,
String name)
Deprecated.
Creates a new scheduled thread pool.
|
ScheduledExecutorService |
newScheduledThreadPool(Object source,
String name,
int poolSize)
Deprecated.
Creates a new scheduled thread pool.
|
ExecutorService |
newSingleThreadExecutor(Object source,
String name)
Deprecated.
Creates a new single-threaded thread pool.
|
ExecutorService |
newSynchronousThreadPool(Object source,
String name)
Deprecated.
Creates a new synchronous thread pool, which executes the task in the caller thread (no task queue).
|
ExecutorService |
newThreadPool(Object source,
String name,
int corePoolSize,
int maxPoolSize)
Deprecated.
Creates a new custom thread pool.
|
ExecutorService |
newThreadPool(Object source,
String name,
int corePoolSize,
int maxPoolSize,
int maxQueueSize)
Deprecated.
Creates a new custom thread pool.
|
ExecutorService |
newThreadPool(Object source,
String name,
int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit timeUnit,
int maxQueueSize,
RejectedExecutionHandler rejectedExecutionHandler,
boolean daemon)
Deprecated.
Creates a new custom thread pool.
|
ExecutorService |
newThreadPool(Object source,
String name,
String threadPoolProfileId)
Deprecated.
Creates a new thread pool using based on the given profile id.
|
void |
registerThreadPoolProfile(ThreadPoolProfile profile)
Deprecated.
Registers the given thread pool profile
|
void |
setDefaultThreadPoolProfile(ThreadPoolProfile defaultThreadPoolProfile)
Deprecated.
Sets the default thread pool profile
|
void |
setThreadNamePattern(String pattern)
Deprecated.
Sets the thread name pattern used for creating the full thread name.
|
void |
shutdown(ExecutorService executorService)
Deprecated.
Shutdown the given executor service.
|
List<Runnable> |
shutdownNow(ExecutorService executorService)
Deprecated.
Shutdown now the given executor service.
|
shutdownvoid registerThreadPoolProfile(ThreadPoolProfile profile)
profile - the profileThreadPoolProfile getThreadPoolProfile(String id)
id - id of the thread pool profile to getThreadPoolProfile getDefaultThreadPoolProfile()
void setDefaultThreadPoolProfile(ThreadPoolProfile defaultThreadPoolProfile)
defaultThreadPoolProfile - the new default thread pool profileString getThreadName(String name)
name - name which is appended to the full thread nameString getThreadNamePattern()
void setThreadNamePattern(String pattern) throws IllegalArgumentException
CamelContext
pattern - the patternIllegalArgumentException - if the pattern is invalid.ExecutorService lookup(Object source, String name, String executorServiceRef)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread nameexecutorServiceRef - reference to lookupExecutorService or null if not foundScheduledExecutorService lookupScheduled(Object source, String name, String executorServiceRef)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread nameexecutorServiceRef - reference to lookupScheduledExecutorService or null if not foundExecutorService newDefaultThreadPool(Object source, String name)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread nameExecutorService newThreadPool(Object source, String name, String threadPoolProfileId)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread namethreadPoolProfileId - id of the thread pool profile to use for creating the thread poolExecutorService newCachedThreadPool(Object source, String name)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread nameScheduledExecutorService newScheduledThreadPool(Object source, String name, int poolSize)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread namepoolSize - the core pool sizeScheduledExecutorService newScheduledThreadPool(Object source, String name)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread nameExecutorService newFixedThreadPool(Object source, String name, int poolSize)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread namepoolSize - the core pool sizeExecutorService newSingleThreadExecutor(Object source, String name)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread nameExecutorService newSynchronousThreadPool(Object source, String name)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread nameExecutorService newThreadPool(Object source, String name, int corePoolSize, int maxPoolSize)
CallerRunsPolicy as rejection handlersource - the source object, usually it should be this passed in as parametername - name which is appended to the thread namecorePoolSize - the core pool sizemaxPoolSize - the maximum pool sizeExecutorService newThreadPool(Object source, String name, int corePoolSize, int maxPoolSize, int maxQueueSize)
CallerRunsPolicy as rejection handlersource - the source object, usually it should be this passed in as parametername - name which is appended to the thread namecorePoolSize - the core pool sizemaxPoolSize - the maximum pool sizemaxQueueSize - the maximum number of tasks in the queue, use Integer.MAX_INT or -1 to indicate unboundedExecutorService newThreadPool(Object source, String name, int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit timeUnit, int maxQueueSize, RejectedExecutionHandler rejectedExecutionHandler, boolean daemon)
source - the source object, usually it should be this passed in as parametername - name which is appended to the thread namecorePoolSize - the core pool sizemaxPoolSize - the maximum pool sizekeepAliveTime - keep alive time for idle threadstimeUnit - time unit for keep alive timemaxQueueSize - the maximum number of tasks in the queue, use Integer.MAX_INT or -1 to indicate unboundedrejectedExecutionHandler - the handler for tasks which cannot be executed by the thread pool.
If null is provided then CallerRunsPolicy is used.daemon - whether or not the created threads is daemon or notvoid shutdown(ExecutorService executorService)
executorService - the executor service to shutdownExecutorService.shutdown()List<Runnable> shutdownNow(ExecutorService executorService)
executorService - the executor service to shutdown nowExecutorService.shutdownNow()Apache Camel