ChainedThreadingProfile (Mule ESB 2.2.1 API)
Keywords: org.mule.config.ChainedThreadingProfile class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.config
Class ChainedThreadingProfile

    java.lang.Object
      org.mule.config.ChainedThreadingProfile

All Implemented Interfaces:
  ThreadingProfile

    public class ChainedThreadingProfile

extends Object
implements ThreadingProfile

This was written (perhaps too far in advance) with an eye to how we will manage default values in a dynamic environment. Since very little has been decided in that direction the correct behaviour is unclear - changing the default value of "dyanamic" `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) dyanmic 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).

Nested Class Summary

Nested classes/interfaces inherited from interface org.mule.api.config.ThreadingProfile
`ThreadingProfile.WorkManagerFactory`

Field Summary

Fields inherited from interface org.mule.api.config.ThreadingProfile
`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 Summary
`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.

Method Summary
`edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor` | `createPool()`
`edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor` | `createPool(String name)`
`WorkManager` | `createWorkManager(String name)`
`int` | `getMaxBufferSize()`
`int` | `getMaxThreadsActive()`
`int` | `getMaxThreadsIdle()`
`int` | `getPoolExhaustedAction()`
`edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler` | `getRejectedExecutionHandler()`
`edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory` | `getThreadFactory()`
`long` | `getThreadTTL()`
`long` | `getThreadWaitTimeout()`
`ThreadingProfile.WorkManagerFactory` | `getWorkManagerFactory()`
`boolean` | `isDoThreading()`
`void` | `setDoThreading(boolean doThreading)`
`void` | `setMaxBufferSize(int maxBufferSize)`
`void` | `setMaxThreadsActive(int maxThreadsActive)`
`void` | `setMaxThreadsIdle(int maxThreadsIdle)`
`void` | `setPoolExhaustedAction(int poolExhaustPolicy)`
`void` | `setRejectedExecutionHandler(edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)`
`void` | `setThreadFactory(edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory threadFactory)`
`void` | `setThreadTTL(long threadTTL)`
`void` | `setThreadWaitTimeout(long threadWaitTimeout)`
`void` | `setWorkManagerFactory(ThreadingProfile.WorkManagerFactory workManagerFactory)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ChainedThreadingProfile

    public ChainedThreadingProfile()

  Generate a mutable threading profile with fixed default values taken from `ThreadingProfile.DEFAULT_THREADING_PROFILE`

### ChainedThreadingProfile

    public ChainedThreadingProfile(ThreadingProfile delegate)

  Generate a mutable threading profile with dynamic default values taken from the given delegate.

  Parameters:
    `delegate` -

### ChainedThreadingProfile

    public ChainedThreadingProfile(ThreadingProfile delegate,
                                   boolean dynamic)

  Generate a mutable threading profile. Default values are taken from the "delegate" argument. If dynamic is true then changes in the delegate instance are reflected in this instance.

  Parameters:
    `delegate` - Source of default values.
    `dynamic` - If true, changes in delegate are reflected in this instance

Method Detail

### getMaxThreadsActive

    public int getMaxThreadsActive()

  Specified by:
    `getMaxThreadsActive` in interface `ThreadingProfile`

### getMaxThreadsIdle

    public int getMaxThreadsIdle()

  Specified by:
    `getMaxThreadsIdle` in interface `ThreadingProfile`

### getThreadTTL

    public long getThreadTTL()

  Specified by:
    `getThreadTTL` in interface `ThreadingProfile`

### getThreadWaitTimeout

    public long getThreadWaitTimeout()

  Specified by:
    `getThreadWaitTimeout` in interface `ThreadingProfile`

### getPoolExhaustedAction

    public int getPoolExhaustedAction()

  Specified by:
    `getPoolExhaustedAction` in interface `ThreadingProfile`

### getRejectedExecutionHandler

    public edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler getRejectedExecutionHandler()

  Specified by:
    `getRejectedExecutionHandler` in interface `ThreadingProfile`

### getThreadFactory

    public edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory getThreadFactory()

  Specified by:
    `getThreadFactory` in interface `ThreadingProfile`

### setMaxThreadsActive

    public void setMaxThreadsActive(int maxThreadsActive)

  Specified by:
    `setMaxThreadsActive` in interface `ThreadingProfile`

### setMaxThreadsIdle

    public void setMaxThreadsIdle(int maxThreadsIdle)

  Specified by:
    `setMaxThreadsIdle` in interface `ThreadingProfile`

### setThreadTTL

    public void setThreadTTL(long threadTTL)

  Specified by:
    `setThreadTTL` in interface `ThreadingProfile`

### setThreadWaitTimeout

    public void setThreadWaitTimeout(long threadWaitTimeout)

  Specified by:
    `setThreadWaitTimeout` in interface `ThreadingProfile`

### setPoolExhaustedAction

    public void setPoolExhaustedAction(int poolExhaustPolicy)

  Specified by:
    `setPoolExhaustedAction` in interface `ThreadingProfile`

### setRejectedExecutionHandler

    public void setRejectedExecutionHandler(edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)

  Specified by:
    `setRejectedExecutionHandler` in interface `ThreadingProfile`

### setThreadFactory

    public void setThreadFactory(edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory threadFactory)

  Specified by:
    `setThreadFactory` in interface `ThreadingProfile`

### getMaxBufferSize

    public int getMaxBufferSize()

  Specified by:
    `getMaxBufferSize` in interface `ThreadingProfile`

### setMaxBufferSize

    public void setMaxBufferSize(int maxBufferSize)

  Specified by:
    `setMaxBufferSize` in interface `ThreadingProfile`

### getWorkManagerFactory

    public ThreadingProfile.WorkManagerFactory getWorkManagerFactory()

  Specified by:
    `getWorkManagerFactory` in interface `ThreadingProfile`

### setWorkManagerFactory

    public void setWorkManagerFactory(ThreadingProfile.WorkManagerFactory workManagerFactory)

  Specified by:
    `setWorkManagerFactory` in interface `ThreadingProfile`

### createWorkManager

    public WorkManager createWorkManager(String name)

  Specified by:
    `createWorkManager` in interface `ThreadingProfile`

### createPool

    public edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor createPool()

  Specified by:
    `createPool` in interface `ThreadingProfile`

### createPool

    public edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor createPool(String name)

  Specified by:
    `createPool` in interface `ThreadingProfile`

### isDoThreading

    public boolean isDoThreading()

  Specified by:
    `isDoThreading` in interface `ThreadingProfile`

### setDoThreading

    public void setDoThreading(boolean doThreading)

  Specified by:
    `setDoThreading` in interface `ThreadingProfile`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.