|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultExecutorServiceStrategy
ExecutorServiceManager instead, will be removed in a future Camel release
@Deprecated public class DefaultExecutorServiceStrategy
| Field Summary |
|---|
| Fields inherited from class org.apache.camel.support.ServiceSupport |
|---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
| Constructor Summary | |
|---|---|
DefaultExecutorServiceStrategy(CamelContext camelContext)
Deprecated. |
|
| Method Summary | |
|---|---|
protected void |
doStart()
Deprecated. Implementations override this method to support customized start/stop. |
protected void |
doStop()
Deprecated. Implementations override this method to support customized start/stop. |
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. Lookup a ExecutorService from the Registry
and from known list of ThreadPoolProfile(s). |
ScheduledExecutorService |
lookupScheduled(Object source,
String name,
String executorServiceRef)
Deprecated. Lookup a ScheduledExecutorService from the Registry
and from known list of ThreadPoolProfile(s). |
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. |
| Methods inherited from class org.apache.camel.support.ServiceSupport |
|---|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.camel.ShutdownableService |
|---|
shutdown |
| Methods inherited from interface org.apache.camel.Service |
|---|
start, stop |
| Constructor Detail |
|---|
public DefaultExecutorServiceStrategy(CamelContext camelContext)
| Method Detail |
|---|
public void registerThreadPoolProfile(ThreadPoolProfile profile)
ExecutorServiceStrategy
registerThreadPoolProfile in interface ExecutorServiceStrategyprofile - the profilepublic ThreadPoolProfile getThreadPoolProfile(String id)
ExecutorServiceStrategy
getThreadPoolProfile in interface ExecutorServiceStrategyid - id of the thread pool profile to get
public ThreadPoolProfile getDefaultThreadPoolProfile()
ExecutorServiceStrategy
getDefaultThreadPoolProfile in interface ExecutorServiceStrategypublic void setDefaultThreadPoolProfile(ThreadPoolProfile defaultThreadPoolProfile)
ExecutorServiceStrategy
setDefaultThreadPoolProfile in interface ExecutorServiceStrategydefaultThreadPoolProfile - the new default thread pool profilepublic String getThreadName(String name)
ExecutorServiceStrategy
getThreadName in interface ExecutorServiceStrategyname - name which is appended to the full thread name
public String getThreadNamePattern()
ExecutorServiceStrategy
getThreadNamePattern in interface ExecutorServiceStrategy
public void setThreadNamePattern(String pattern)
throws IllegalArgumentException
ExecutorServiceStrategyCamelContext
setThreadNamePattern in interface ExecutorServiceStrategypattern - the pattern
IllegalArgumentException - if the pattern is invalid.
public ExecutorService lookup(Object source,
String name,
String executorServiceRef)
ExecutorServiceStrategyExecutorService from the Registry
and from known list of ThreadPoolProfile(s).
lookup in interface ExecutorServiceStrategysource - the source object, usually it should be this passed in as parametername - name which is appended to the thread nameexecutorServiceRef - reference to lookup
ExecutorService or null if not found
public ScheduledExecutorService lookupScheduled(Object source,
String name,
String executorServiceRef)
ExecutorServiceStrategyScheduledExecutorService from the Registry
and from known list of ThreadPoolProfile(s).
lookupScheduled in interface ExecutorServiceStrategysource - the source object, usually it should be this passed in as parametername - name which is appended to the thread nameexecutorServiceRef - reference to lookup
ScheduledExecutorService or null if not found
public ExecutorService newDefaultThreadPool(Object source,
String name)
ExecutorServiceStrategy
newDefaultThreadPool in interface ExecutorServiceStrategysource - the source object, usually it should be this passed in as parametername - name which is appended to the thread name
public ExecutorService newThreadPool(Object source,
String name,
String threadPoolProfileId)
ExecutorServiceStrategy
newThreadPool in interface ExecutorServiceStrategysource - 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 pool
public ExecutorService newCachedThreadPool(Object source,
String name)
ExecutorServiceStrategy
newCachedThreadPool in interface ExecutorServiceStrategysource - the source object, usually it should be this passed in as parametername - name which is appended to the thread name
public ScheduledExecutorService newScheduledThreadPool(Object source,
String name,
int poolSize)
ExecutorServiceStrategy
newScheduledThreadPool in interface ExecutorServiceStrategysource - the source object, usually it should be this passed in as parametername - name which is appended to the thread namepoolSize - the core pool size
public ScheduledExecutorService newScheduledThreadPool(Object source,
String name)
ExecutorServiceStrategy
newScheduledThreadPool in interface ExecutorServiceStrategysource - the source object, usually it should be this passed in as parametername - name which is appended to the thread name
public ExecutorService newFixedThreadPool(Object source,
String name,
int poolSize)
ExecutorServiceStrategy
newFixedThreadPool in interface ExecutorServiceStrategysource - the source object, usually it should be this passed in as parametername - name which is appended to the thread namepoolSize - the core pool size
public ExecutorService newSingleThreadExecutor(Object source,
String name)
ExecutorServiceStrategy
newSingleThreadExecutor in interface ExecutorServiceStrategysource - the source object, usually it should be this passed in as parametername - name which is appended to the thread name
public ExecutorService newSynchronousThreadPool(Object source,
String name)
ExecutorServiceStrategy
newSynchronousThreadPool in interface ExecutorServiceStrategysource - the source object, usually it should be this passed in as parametername - name which is appended to the thread name
public ExecutorService newThreadPool(Object source,
String name,
int corePoolSize,
int maxPoolSize)
ExecutorServiceStrategyCallerRunsPolicy as rejection handler
newThreadPool in interface ExecutorServiceStrategysource - 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 size
public ExecutorService newThreadPool(Object source,
String name,
int corePoolSize,
int maxPoolSize,
int maxQueueSize)
ExecutorServiceStrategyCallerRunsPolicy as rejection handler
newThreadPool in interface ExecutorServiceStrategysource - 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 unbounded
public ExecutorService newThreadPool(Object source,
String name,
int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit timeUnit,
int maxQueueSize,
RejectedExecutionHandler rejectedExecutionHandler,
boolean daemon)
ExecutorServiceStrategy
newThreadPool in interface ExecutorServiceStrategysource - 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 not
public void shutdown(ExecutorService executorService)
ExecutorServiceStrategy
shutdown in interface ExecutorServiceStrategyexecutorService - the executor service to shutdownExecutorService.shutdown()public List<Runnable> shutdownNow(ExecutorService executorService)
ExecutorServiceStrategy
shutdownNow in interface ExecutorServiceStrategyexecutorService - the executor service to shutdown now
ExecutorService.shutdownNow()
protected void doStart()
throws Exception
ServiceSupportServiceSupport.doStop() for more details.
doStart in class ServiceSupportExceptionServiceSupport.doStop()
protected void doStop()
throws Exception
ServiceSupportServiceSupport.doStop() method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext is shutting down.
doStop in class ServiceSupportExceptionServiceSupport.doStart()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||