public abstract class BaseExecutorServiceManager
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.ExecutorServiceManager
ExecutorServiceManager which can be used for implementations| Constructor and Description |
|---|
BaseExecutorServiceManager(org.apache.camel.CamelContext camelContext) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(ExecutorService executorService,
long shutdownAwaitTermination) |
protected ThreadFactory |
createThreadFactory(String name,
boolean isDaemon) |
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
org.apache.camel.spi.ThreadPoolProfile |
getDefaultThreadPoolProfile() |
long |
getShutdownAwaitTermination() |
String |
getThreadNamePattern() |
org.apache.camel.spi.ThreadPoolFactory |
getThreadPoolFactory() |
org.apache.camel.spi.ThreadPoolProfile |
getThreadPoolProfile(String id) |
ExecutorService |
newCachedThreadPool(Object source,
String name) |
ScheduledExecutorService |
newDefaultScheduledThreadPool(Object source,
String name) |
ExecutorService |
newDefaultThreadPool(Object source,
String name) |
ExecutorService |
newFixedThreadPool(Object source,
String name,
int poolSize) |
ScheduledExecutorService |
newScheduledThreadPool(Object source,
String name,
int poolSize) |
ScheduledExecutorService |
newScheduledThreadPool(Object source,
String name,
String profileId) |
ScheduledExecutorService |
newScheduledThreadPool(Object source,
String name,
org.apache.camel.spi.ThreadPoolProfile profile) |
ExecutorService |
newSingleThreadExecutor(Object source,
String name) |
ScheduledExecutorService |
newSingleThreadScheduledExecutor(Object source,
String name) |
Thread |
newThread(String name,
Runnable runnable) |
ExecutorService |
newThreadPool(Object source,
String name,
int poolSize,
int maxPoolSize) |
ExecutorService |
newThreadPool(Object source,
String name,
String profileId) |
ExecutorService |
newThreadPool(Object source,
String name,
org.apache.camel.spi.ThreadPoolProfile profile) |
protected void |
onNewExecutorService(ExecutorService executorService)
Strategy callback when a new
ExecutorService have been created. |
void |
registerThreadPoolProfile(org.apache.camel.spi.ThreadPoolProfile profile) |
String |
resolveThreadName(String name) |
void |
setDefaultThreadPoolProfile(org.apache.camel.spi.ThreadPoolProfile defaultThreadPoolProfile) |
void |
setShutdownAwaitTermination(long shutdownAwaitTermination) |
void |
setThreadNamePattern(String threadNamePattern) |
void |
setThreadPoolFactory(org.apache.camel.spi.ThreadPoolFactory threadPoolFactory) |
void |
shutdown(ExecutorService executorService) |
void |
shutdownGraceful(ExecutorService executorService) |
void |
shutdownGraceful(ExecutorService executorService,
long shutdownAwaitTermination) |
List<Runnable> |
shutdownNow(ExecutorService executorService) |
build, doBuild, doInit, doResume, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic BaseExecutorServiceManager(org.apache.camel.CamelContext camelContext)
public org.apache.camel.CamelContext getCamelContext()
public org.apache.camel.spi.ThreadPoolFactory getThreadPoolFactory()
getThreadPoolFactory in interface org.apache.camel.spi.ExecutorServiceManagerpublic void setThreadPoolFactory(org.apache.camel.spi.ThreadPoolFactory threadPoolFactory)
setThreadPoolFactory in interface org.apache.camel.spi.ExecutorServiceManagerpublic void registerThreadPoolProfile(org.apache.camel.spi.ThreadPoolProfile profile)
registerThreadPoolProfile in interface org.apache.camel.spi.ExecutorServiceManagerpublic org.apache.camel.spi.ThreadPoolProfile getThreadPoolProfile(String id)
getThreadPoolProfile in interface org.apache.camel.spi.ExecutorServiceManagerpublic org.apache.camel.spi.ThreadPoolProfile getDefaultThreadPoolProfile()
getDefaultThreadPoolProfile in interface org.apache.camel.spi.ExecutorServiceManagerpublic void setDefaultThreadPoolProfile(org.apache.camel.spi.ThreadPoolProfile defaultThreadPoolProfile)
setDefaultThreadPoolProfile in interface org.apache.camel.spi.ExecutorServiceManagerpublic String getThreadNamePattern()
getThreadNamePattern in interface org.apache.camel.spi.ExecutorServiceManagerpublic void setThreadNamePattern(String threadNamePattern)
setThreadNamePattern in interface org.apache.camel.spi.ExecutorServiceManagerpublic long getShutdownAwaitTermination()
getShutdownAwaitTermination in interface org.apache.camel.spi.ExecutorServiceManagerpublic void setShutdownAwaitTermination(long shutdownAwaitTermination)
setShutdownAwaitTermination in interface org.apache.camel.spi.ExecutorServiceManagerpublic String resolveThreadName(String name)
resolveThreadName in interface org.apache.camel.spi.ExecutorServiceManagerpublic Thread newThread(String name, Runnable runnable)
newThread in interface org.apache.camel.spi.ExecutorServiceManagerpublic ExecutorService newDefaultThreadPool(Object source, String name)
newDefaultThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic ScheduledExecutorService newDefaultScheduledThreadPool(Object source, String name)
newDefaultScheduledThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic ExecutorService newThreadPool(Object source, String name, String profileId)
newThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic ExecutorService newThreadPool(Object source, String name, org.apache.camel.spi.ThreadPoolProfile profile)
newThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic ExecutorService newThreadPool(Object source, String name, int poolSize, int maxPoolSize)
newThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic ExecutorService newSingleThreadExecutor(Object source, String name)
newSingleThreadExecutor in interface org.apache.camel.spi.ExecutorServiceManagerpublic ExecutorService newCachedThreadPool(Object source, String name)
newCachedThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic ExecutorService newFixedThreadPool(Object source, String name, int poolSize)
newFixedThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic ScheduledExecutorService newSingleThreadScheduledExecutor(Object source, String name)
newSingleThreadScheduledExecutor in interface org.apache.camel.spi.ExecutorServiceManagerpublic ScheduledExecutorService newScheduledThreadPool(Object source, String name, org.apache.camel.spi.ThreadPoolProfile profile)
newScheduledThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic ScheduledExecutorService newScheduledThreadPool(Object source, String name, String profileId)
newScheduledThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic ScheduledExecutorService newScheduledThreadPool(Object source, String name, int poolSize)
newScheduledThreadPool in interface org.apache.camel.spi.ExecutorServiceManagerpublic void shutdown(ExecutorService executorService)
shutdown in interface org.apache.camel.spi.ExecutorServiceManagerpublic void shutdownGraceful(ExecutorService executorService)
shutdownGraceful in interface org.apache.camel.spi.ExecutorServiceManagerpublic void shutdownGraceful(ExecutorService executorService, long shutdownAwaitTermination)
shutdownGraceful in interface org.apache.camel.spi.ExecutorServiceManagerpublic List<Runnable> shutdownNow(ExecutorService executorService)
shutdownNow in interface org.apache.camel.spi.ExecutorServiceManagerpublic boolean awaitTermination(ExecutorService executorService, long shutdownAwaitTermination) throws InterruptedException
awaitTermination in interface org.apache.camel.spi.ExecutorServiceManagerInterruptedExceptionprotected void onNewExecutorService(ExecutorService executorService)
ExecutorService have been created.executorService - the created ExecutorServiceprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.ServiceSupportExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.service.ServiceSupportExceptionprotected void doShutdown()
throws Exception
doShutdown in class org.apache.camel.support.service.ServiceSupportExceptionprotected ThreadFactory createThreadFactory(String name, boolean isDaemon)
Apache Camel