public class ImmutableThreadingProfile extends Object implements ThreadingProfile
Modifier and Type | Class and Description |
---|---|
static class |
ImmutableThreadingProfile.DefaultWorkManagerFactory |
ThreadingProfile.WorkManagerFactory
DEFAULT_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 |
---|
ImmutableThreadingProfile(int maxThreadsActive,
int maxThreadsIdle,
int maxBufferSize,
long threadTTL,
long threadWaitTimeout,
int poolExhaustedAction,
boolean doThreading,
RejectedExecutionHandler rejectedExecutionHandler,
ThreadFactory threadFactory) |
ImmutableThreadingProfile(ThreadingProfile tp) |
public ImmutableThreadingProfile(int maxThreadsActive, int maxThreadsIdle, int maxBufferSize, long threadTTL, long threadWaitTimeout, int poolExhaustedAction, boolean doThreading, RejectedExecutionHandler rejectedExecutionHandler, ThreadFactory threadFactory)
public ImmutableThreadingProfile(ThreadingProfile tp)
public int getMaxThreadsActive()
getMaxThreadsActive
in interface ThreadingProfile
public int getMaxThreadsIdle()
getMaxThreadsIdle
in interface ThreadingProfile
public long getThreadTTL()
getThreadTTL
in interface ThreadingProfile
public long getThreadWaitTimeout()
getThreadWaitTimeout
in interface ThreadingProfile
public int getPoolExhaustedAction()
getPoolExhaustedAction
in interface ThreadingProfile
public RejectedExecutionHandler getRejectedExecutionHandler()
getRejectedExecutionHandler
in interface ThreadingProfile
public ThreadFactory getThreadFactory()
getThreadFactory
in interface ThreadingProfile
public void setMaxThreadsActive(int maxThreadsActive)
setMaxThreadsActive
in interface ThreadingProfile
public void setMaxThreadsIdle(int maxThreadsIdle)
setMaxThreadsIdle
in interface ThreadingProfile
public void setThreadTTL(long threadTTL)
setThreadTTL
in interface ThreadingProfile
public void setThreadWaitTimeout(long threadWaitTimeout)
setThreadWaitTimeout
in interface ThreadingProfile
public void setPoolExhaustedAction(int poolExhaustPolicy)
setPoolExhaustedAction
in interface ThreadingProfile
public void setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler)
setRejectedExecutionHandler
in interface ThreadingProfile
public void setThreadFactory(ThreadFactory threadFactory)
setThreadFactory
in interface ThreadingProfile
public int getMaxBufferSize()
getMaxBufferSize
in interface ThreadingProfile
public void setMaxBufferSize(int maxBufferSize)
setMaxBufferSize
in interface ThreadingProfile
public ThreadingProfile.WorkManagerFactory getWorkManagerFactory()
getWorkManagerFactory
in interface ThreadingProfile
public void setWorkManagerFactory(ThreadingProfile.WorkManagerFactory workManagerFactory)
setWorkManagerFactory
in interface ThreadingProfile
public WorkManager createWorkManager(String name, int shutdownTimeout)
createWorkManager
in interface ThreadingProfile
public ExecutorService createPool()
createPool
in interface ThreadingProfile
public ExecutorService createPool(String name)
createPool
in interface ThreadingProfile
public boolean isDoThreading()
isDoThreading
in interface ThreadingProfile
public void setDoThreading(boolean doThreading)
setDoThreading
in interface ThreadingProfile
public ThreadPoolFactory getPoolFactory()
getPoolFactory
in interface ThreadingProfile
public ScheduledExecutorService createScheduledPool(String name)
createScheduledPool
in interface ThreadingProfile
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public MuleContext getMuleContext()
getMuleContext
in interface ThreadingProfile
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.