public class ChainedThreadingProfile extends Object implements ThreadingProfile
ChainedThreadingProfile(ThreadingProfile)
will switch behaviour between dynamic and static chaining.
Note that within Spring, as far as I understand things, object creation is always ordered so that dependencies are correctly resolved. In that case, in a static scenario (or in a dynamic one that rebuilds the instances) dynamic and static behaviour should be identical.
Also, the "lazy" chaining is an optimisation - all hierarchies should be grounded in a final
default which is ImmutableThreadingProfile and, as such, return reliable
values (lazy would be necessary if this is not the case, since we must avoid evaluating
incomplete delegates).
ThreadingProfile.WorkManagerFactoryDEFAULT_DO_THREADING, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_MAX_THREAD_TTL, DEFAULT_MAX_THREADS_ACTIVE, DEFAULT_MAX_THREADS_IDLE, DEFAULT_POOL_EXHAUST_ACTION, DEFAULT_THREAD_WAIT_TIMEOUT, DEFAULT_THREADING_PROFILE, POOL_EXHAUSTED_ACTIONS, WHEN_EXHAUSTED_ABORT, WHEN_EXHAUSTED_DISCARD, WHEN_EXHAUSTED_DISCARD_OLDEST, WHEN_EXHAUSTED_RUN, WHEN_EXHAUSTED_WAIT| Constructor and Description |
|---|
ChainedThreadingProfile()
Generate a mutable threading profile with fixed default values taken from
ThreadingProfile.DEFAULT_THREADING_PROFILE |
ChainedThreadingProfile(ThreadingProfile delegate)
Generate a mutable threading profile with dynamic default values taken from the
given delegate.
|
ChainedThreadingProfile(ThreadingProfile delegate,
boolean dynamic)
Generate a mutable threading profile.
|
public ChainedThreadingProfile()
ThreadingProfile.DEFAULT_THREADING_PROFILEpublic ChainedThreadingProfile(ThreadingProfile delegate)
public ChainedThreadingProfile(ThreadingProfile delegate, boolean dynamic)
delegate - Source of default values.dynamic - If true, changes in delegate are reflected in this instancepublic int getMaxThreadsActive()
getMaxThreadsActive in interface ThreadingProfilepublic int getMaxThreadsIdle()
getMaxThreadsIdle in interface ThreadingProfilepublic long getThreadTTL()
getThreadTTL in interface ThreadingProfilepublic long getThreadWaitTimeout()
getThreadWaitTimeout in interface ThreadingProfilepublic int getPoolExhaustedAction()
getPoolExhaustedAction in interface ThreadingProfilepublic RejectedExecutionHandler getRejectedExecutionHandler()
getRejectedExecutionHandler in interface ThreadingProfilepublic ThreadFactory getThreadFactory()
getThreadFactory in interface ThreadingProfilepublic void setMaxThreadsActive(int maxThreadsActive)
setMaxThreadsActive in interface ThreadingProfilepublic void setMaxThreadsIdle(int maxThreadsIdle)
setMaxThreadsIdle in interface ThreadingProfilepublic void setThreadTTL(long threadTTL)
setThreadTTL in interface ThreadingProfilepublic void setThreadWaitTimeout(long threadWaitTimeout)
setThreadWaitTimeout in interface ThreadingProfilepublic void setPoolExhaustedAction(int poolExhaustPolicy)
setPoolExhaustedAction in interface ThreadingProfilepublic void setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler)
setRejectedExecutionHandler in interface ThreadingProfilepublic void setThreadFactory(ThreadFactory threadFactory)
setThreadFactory in interface ThreadingProfilepublic int getMaxBufferSize()
getMaxBufferSize in interface ThreadingProfilepublic void setMaxBufferSize(int maxBufferSize)
setMaxBufferSize in interface ThreadingProfilepublic ThreadingProfile.WorkManagerFactory getWorkManagerFactory()
getWorkManagerFactory in interface ThreadingProfilepublic void setWorkManagerFactory(ThreadingProfile.WorkManagerFactory workManagerFactory)
setWorkManagerFactory in interface ThreadingProfilepublic WorkManager createWorkManager(String name, int shutdownTimeout)
createWorkManager in interface ThreadingProfilepublic ExecutorService createPool()
createPool in interface ThreadingProfilepublic ExecutorService createPool(String name)
createPool in interface ThreadingProfilepublic boolean isDoThreading()
isDoThreading in interface ThreadingProfilepublic void setDoThreading(boolean doThreading)
setDoThreading in interface ThreadingProfilepublic ThreadPoolFactory getPoolFactory()
getPoolFactory in interface ThreadingProfilepublic ScheduledExecutorService createScheduledPool(String name)
createScheduledPool in interface ThreadingProfilepublic MuleContext getMuleContext()
getMuleContext in interface ThreadingProfilepublic void setMuleContext(MuleContext muleContext)
setMuleContext in interface MuleContextAwareCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.