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.transport
Interface ConfigurableKeyedObjectPool

All Superinterfaces:
  KeyedObjectPool

All Known Implementing Classes:
  DefaultConfigurableKeyedObjectPool

    public interface ConfigurableKeyedObjectPool

extends KeyedObjectPool

A configurable `KeyedObjectPool`. Extracted from `GenericKeyedObjectPool`.

Field Summary
`static byte` | `WHEN_EXHAUSTED_BLOCK`
`static byte` | `WHEN_EXHAUSTED_FAIL`
`static byte` | `WHEN_EXHAUSTED_GROW`

Method Summary
`void` | `clear()` Clears the pool, removing all pooled instances.
`int` | `getMaxActive()` Returns the cap on the number of active instances per key.
`int` | `getMaxIdle()` Returns the cap on the number of "idle" instances per key.
`int` | `getMaxTotal()` Returns the overall maximum number of objects (across pools) that can exist at one time.
`long` | `getMaxWait()` Returns the maximum amount of time (in milliseconds) the `KeyedObjectPool.borrowObject(java.lang.Object)` method should block before throwing an exception when the pool is exhausted and the `"when exhausted" action` is `WHEN_EXHAUSTED_BLOCK`.
`byte` | `getWhenExhaustedAction()` Returns the action to take when the `KeyedObjectPool.borrowObject(java.lang.Object)` method is invoked when the pool is exhausted.
`void` | `setMaxActive(int maxActive)` Sets the cap on the number of active instances per key.
`void` | `setMaxIdle(int maxIdle)` Sets the cap on the number of "idle" instances in the pool.
`void` | `setMaxTotal(int maxTotal)` Sets the cap on the total number of instances from all pools combined.
`void` | `setMaxWait(long maxWait)` Sets the maximum amount of time (in milliseconds) the `KeyedObjectPool.borrowObject(java.lang.Object)` method should block before throwing an exception when the pool is exhausted and the `"when exhausted" action` is `WHEN_EXHAUSTED_BLOCK`.
`void` | `setWhenExhaustedAction(byte whenExhaustedAction)` Sets the action to take when the `KeyedObjectPool.borrowObject(java.lang.Object)` method is invoked when the pool is exhausted.

Methods inherited from interface org.apache.commons.pool.KeyedObjectPool
`addObject, borrowObject, clear, close, getNumActive, getNumActive, getNumIdle, getNumIdle, invalidateObject, returnObject, setFactory`

Field Detail

### WHEN_EXHAUSTED_FAIL

    static final byte WHEN_EXHAUSTED_FAIL

See Also:
  Constant Field Values

### WHEN_EXHAUSTED_BLOCK

    static final byte WHEN_EXHAUSTED_BLOCK

See Also:
  Constant Field Values

### WHEN_EXHAUSTED_GROW

    static final byte WHEN_EXHAUSTED_GROW

See Also:
  Constant Field Values

Method Detail

### clear

    void clear()

  Clears the pool, removing all pooled instances.

  Specified by:
    `clear` in interface `KeyedObjectPool`

### getMaxTotal

    int getMaxTotal()

  Returns the overall maximum number of objects (across pools) that can exist at one time. A negative value indicates no limit.

### setMaxTotal

    void setMaxTotal(int maxTotal)

  Sets the cap on the total number of instances from all pools combined.

  Parameters:
    `maxTotal` - The cap on the total number of instances across pools. Use a negative value for no limit.

### getMaxActive

    int getMaxActive()

  Returns the cap on the number of active instances per key. A negative value indicates no limit.

### setMaxActive

    void setMaxActive(int maxActive)

  Sets the cap on the number of active instances per key.

  Parameters:
    `maxActive` - The cap on the number of active instances per key. Use a negative value for no limit.

### getMaxWait

    long getMaxWait()

  Returns the maximum amount of time (in milliseconds) the `KeyedObjectPool.borrowObject(java.lang.Object)` method should block before throwing an exception when the pool is exhausted and the `"when exhausted" action` is `WHEN_EXHAUSTED_BLOCK`.

  When less than or equal to 0, the `KeyedObjectPool.borrowObject(java.lang.Object)` method may block indefinitely.

### setMaxWait

    void setMaxWait(long maxWait)

  Sets the maximum amount of time (in milliseconds) the `KeyedObjectPool.borrowObject(java.lang.Object)` method should block before throwing an exception when the pool is exhausted and the `"when exhausted" action` is `WHEN_EXHAUSTED_BLOCK`.

  When less than or equal to 0, the `KeyedObjectPool.borrowObject(java.lang.Object)` method may block indefinitely.

  Parameters:
    `maxWait` - the maximum number of milliseconds borrowObject will block or negative for indefinitely.

### getMaxIdle

    int getMaxIdle()

  Returns the cap on the number of "idle" instances per key.

### setMaxIdle

    void setMaxIdle(int maxIdle)

  Sets the cap on the number of "idle" instances in the pool.

  Parameters:
    `maxIdle` - the maximum number of "idle" instances that can be held in a given keyed pool. Use a negative value for no limit.

### setWhenExhaustedAction

    void setWhenExhaustedAction(byte whenExhaustedAction)

  Sets the action to take when the `KeyedObjectPool.borrowObject(java.lang.Object)` method is invoked when the pool is exhausted.

  Parameters:
    `whenExhaustedAction` - the action code, which must be one of `WHEN_EXHAUSTED_BLOCK`, `WHEN_EXHAUSTED_FAIL`, or `WHEN_EXHAUSTED_GROW`

### getWhenExhaustedAction

    byte getWhenExhaustedAction()

  Returns the action to take when the `KeyedObjectPool.borrowObject(java.lang.Object)` method is invoked when the pool is exhausted.

  Returns:
    one of `WHEN_EXHAUSTED_BLOCK`, `WHEN_EXHAUSTED_FAIL` or `WHEN_EXHAUSTED_GROW`

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-2010 MuleSoft, Inc.. All Rights Reserved.