org.mule.config
Class ThreadingProfile

java.lang.Object
  extended byorg.mule.config.ThreadingProfile

public class ThreadingProfile
extends java.lang.Object

ThreadingProfile is used to configure a thread pool. Mule uses a few different pools i.e. for component threds and message dispatchers. This object makes it easier to configure the pool.

Version:
$Revision: 1.6 $
Author:
Ross Mason

Nested Class Summary
static class ThreadingProfile.NamedThreadFactory
           
static interface ThreadingProfile.WorkManagerFactory
           
 
Field Summary
static boolean DEFAULT_DO_THREADING
          Default value for do threading
static int DEFAULT_MAX_BUFFER_SIZE
          Default value for MAX_BUFFER_SIZE
static long DEFAULT_MAX_THREAD_TTL
          Default value for MAX_THREAD_TTL
static int DEFAULT_MAX_THREADS_ACTIVE
          Default value for MAX_THREADS_ACTIVE
static int DEFAULT_MAX_THREADS_IDLE
          Default value for MAX_THREADS_IDLE
static int DEFAULT_POOL_EXHAUST_ACTION
          Default value for POOL_INITIALISATION_POLICY
static int WHEN_EXHAUSTED_ABORT
           
static int WHEN_EXHAUSTED_DISCARD
           
static int WHEN_EXHAUSTED_DISCARD_OLDEST
           
static int WHEN_EXHAUSTED_RUN
           
static int WHEN_EXHAUSTED_WAIT
           
 
Constructor Summary
ThreadingProfile()
           
ThreadingProfile(int maxThreadsActive, int maxThreadsIdle, long threadTTL, int poolExhaustPolicy, PooledExecutor.BlockedExecutionHandler blockedExecutionHandler, ThreadFactory threadFactory)
           
ThreadingProfile(ThreadingProfile tp)
           
 
Method Summary
 void configurePool(PooledExecutor pool)
           
 PooledExecutor createPool()
           
 PooledExecutor createPool(java.lang.String name)
           
 UMOWorkManager createWorkManager(java.lang.String name)
           
 PooledExecutor.BlockedExecutionHandler getBlockedExecutionHandler()
           
 int getMaxBufferSize()
           
 int getMaxThreadsActive()
           
 int getMaxThreadsIdle()
           
 int getPoolExhaustedAction()
           
 ThreadFactory getThreadFactory()
           
 int getThreadPriority()
           
 long getThreadTTL()
           
 ThreadingProfile.WorkManagerFactory getWorkManagerFactory()
           
 boolean isDoThreading()
           
 void setBlockedExecutionHandler(PooledExecutor.BlockedExecutionHandler blockedExecutionHandler)
           
 void setDoThreading(boolean doThreading)
           
 void setMaxBufferSize(int maxBufferSize)
           
 void setMaxThreadsActive(int maxThreadsActive)
           
 void setMaxThreadsIdle(int maxThreadsIdle)
           
 void setPoolExhaustedAction(int poolExhaustPolicy)
           
 void setPoolExhaustedActionString(java.lang.String poolExhaustPolicy)
           
 void setThreadFactory(ThreadFactory threadFactory)
           
 void setThreadPriority(int threadPriority)
           
 void setThreadTTL(long threadTTL)
           
 void setWorkManagerFactory(ThreadingProfile.WorkManagerFactory workManagerFactory)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WHEN_EXHAUSTED_WAIT

public static final int WHEN_EXHAUSTED_WAIT
See Also:
Constant Field Values

WHEN_EXHAUSTED_DISCARD

public static final int WHEN_EXHAUSTED_DISCARD
See Also:
Constant Field Values

WHEN_EXHAUSTED_DISCARD_OLDEST

public static final int WHEN_EXHAUSTED_DISCARD_OLDEST
See Also:
Constant Field Values

WHEN_EXHAUSTED_ABORT

public static final int WHEN_EXHAUSTED_ABORT
See Also:
Constant Field Values

WHEN_EXHAUSTED_RUN

public static final int WHEN_EXHAUSTED_RUN
See Also:
Constant Field Values

DEFAULT_MAX_THREADS_ACTIVE

public static final int DEFAULT_MAX_THREADS_ACTIVE
Default value for MAX_THREADS_ACTIVE

See Also:
Constant Field Values

DEFAULT_MAX_THREADS_IDLE

public static final int DEFAULT_MAX_THREADS_IDLE
Default value for MAX_THREADS_IDLE

See Also:
Constant Field Values

DEFAULT_MAX_BUFFER_SIZE

public static final int DEFAULT_MAX_BUFFER_SIZE
Default value for MAX_BUFFER_SIZE

See Also:
Constant Field Values

DEFAULT_MAX_THREAD_TTL

public static final long DEFAULT_MAX_THREAD_TTL
Default value for MAX_THREAD_TTL

See Also:
Constant Field Values

DEFAULT_DO_THREADING

public static final boolean DEFAULT_DO_THREADING
Default value for do threading

See Also:
Constant Field Values

DEFAULT_POOL_EXHAUST_ACTION

public static final int DEFAULT_POOL_EXHAUST_ACTION
Default value for POOL_INITIALISATION_POLICY

See Also:
Constant Field Values
Constructor Detail

ThreadingProfile

public ThreadingProfile()

ThreadingProfile

public ThreadingProfile(int maxThreadsActive,
                        int maxThreadsIdle,
                        long threadTTL,
                        int poolExhaustPolicy,
                        PooledExecutor.BlockedExecutionHandler blockedExecutionHandler,
                        ThreadFactory threadFactory)

ThreadingProfile

public ThreadingProfile(ThreadingProfile tp)
Method Detail

getMaxThreadsActive

public int getMaxThreadsActive()

getMaxThreadsIdle

public int getMaxThreadsIdle()

getThreadTTL

public long getThreadTTL()

getThreadPriority

public int getThreadPriority()

setThreadPriority

public void setThreadPriority(int threadPriority)

getPoolExhaustedAction

public int getPoolExhaustedAction()

getBlockedExecutionHandler

public PooledExecutor.BlockedExecutionHandler getBlockedExecutionHandler()

getThreadFactory

public ThreadFactory getThreadFactory()

setMaxThreadsActive

public void setMaxThreadsActive(int maxThreadsActive)

setMaxThreadsIdle

public void setMaxThreadsIdle(int maxThreadsIdle)

setThreadTTL

public void setThreadTTL(long threadTTL)

setPoolExhaustedAction

public void setPoolExhaustedAction(int poolExhaustPolicy)

setPoolExhaustedActionString

public void setPoolExhaustedActionString(java.lang.String poolExhaustPolicy)

setBlockedExecutionHandler

public void setBlockedExecutionHandler(PooledExecutor.BlockedExecutionHandler blockedExecutionHandler)

setThreadFactory

public void setThreadFactory(ThreadFactory threadFactory)

getMaxBufferSize

public int getMaxBufferSize()

setMaxBufferSize

public void setMaxBufferSize(int maxBufferSize)

getWorkManagerFactory

public ThreadingProfile.WorkManagerFactory getWorkManagerFactory()

setWorkManagerFactory

public void setWorkManagerFactory(ThreadingProfile.WorkManagerFactory workManagerFactory)

createWorkManager

public UMOWorkManager createWorkManager(java.lang.String name)

createPool

public PooledExecutor createPool()

createPool

public PooledExecutor createPool(java.lang.String name)

configurePool

public void configurePool(PooledExecutor pool)

isDoThreading

public boolean isDoThreading()

setDoThreading

public void setDoThreading(boolean doThreading)

toString

public java.lang.String toString()


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.