public class PoolingProfile extends Object
PoolingProfile
is a configuration object used to define the object
pooling parameters for the service it is associated with.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_EVICTION_INTERVAL_MILLIS
Determines the number of milliseconds between runs of the object evictor.
|
static int |
DEFAULT_MAX_POOL_ACTIVE
Controls the maximum number of Mule components that can be borrowed from a service
pool at one time.
|
static int |
DEFAULT_MAX_POOL_IDLE
Controls the maximum number of Mule components that can sit idle in the pool at any
time.
|
static long |
DEFAULT_MAX_POOL_WAIT
When the threadPoolExhaustedAction is set to WHEN_EXHAUSTED_WAIT this can
specify the maximum milliseconds the pool should block before throwing a
NoSuchElementException
|
static int |
DEFAULT_MIN_EVICTION_MILLIS
Determines the minimum amount of time an object may sit idle in the pool
before it is eligible for eviction.
|
static int |
DEFAULT_POOL_EXHAUSTED_ACTION
Specifies the behaviour of the Mule component pool when the pool is exhausted:
WHEN_EXHAUSTED_FAIL : will throw a NoSuchElementException
WHEN_EXHAUSTED_WAIT : will block (invoke Object.wait(long) until a new or
idle object is available.
WHEN_EXHAUSTED_GROW : will create a new Mule and return it (essentially
making maxActive meaningless).
If a positive maxWait value is supplied, it will block for at most that many
milliseconds, after which a NoSuchElementException will be thrown.
|
static int |
DEFAULT_POOL_INITIALISATION_POLICY
Determines how components in a pool should be initialised.
|
static int |
INITIALISE_ALL
Tells the object pool to initialise all components on startup.
|
static int |
INITIALISE_NONE
Tells the object pool not to initialise any components on startup.
|
static int |
INITIALISE_ONE
Tells the object pool only to initialise one service on startup.
|
static Map<String,Integer> |
POOL_EXHAUSTED_ACTIONS |
static Map<String,Integer> |
POOL_INITIALISATION_POLICIES |
static int |
WHEN_EXHAUSTED_FAIL |
static int |
WHEN_EXHAUSTED_GROW |
static int |
WHEN_EXHAUSTED_WAIT |
Constructor and Description |
---|
PoolingProfile() |
PoolingProfile(int maxActive,
int maxIdle,
long maxWait,
int exhaustedAction,
int initialisationPolicy) |
PoolingProfile(PoolingProfile pp) |
Modifier and Type | Method and Description |
---|---|
int |
getEvictionCheckIntervalMillis() |
int |
getExhaustedAction() |
int |
getInitialisationPolicy() |
int |
getMaxActive() |
int |
getMaxIdle() |
long |
getMaxWait() |
int |
getMinEvictionMillis() |
void |
setEvictionCheckIntervalMillis(int evictionCheckIntervalMillis) |
void |
setExhaustedAction(int exhaustedAction) |
void |
setInitialisationPolicy(int policy) |
void |
setMaxActive(int maxActive) |
void |
setMaxIdle(int maxIdle) |
void |
setMaxWait(long maxWait) |
void |
setMinEvictionMillis(int minEvictionMillis) |
public static final int INITIALISE_NONE
public static final int INITIALISE_ONE
public static final int INITIALISE_ALL
public static final int WHEN_EXHAUSTED_FAIL
public static final int WHEN_EXHAUSTED_WAIT
public static final int WHEN_EXHAUSTED_GROW
public static final int DEFAULT_MAX_POOL_ACTIVE
public static final int DEFAULT_MAX_POOL_IDLE
public static final long DEFAULT_MAX_POOL_WAIT
public static final int DEFAULT_POOL_EXHAUSTED_ACTION
public static final int DEFAULT_POOL_INITIALISATION_POLICY
public static final int DEFAULT_MIN_EVICTION_MILLIS
public static final int DEFAULT_EVICTION_INTERVAL_MILLIS
public PoolingProfile()
public PoolingProfile(PoolingProfile pp)
public PoolingProfile(int maxActive, int maxIdle, long maxWait, int exhaustedAction, int initialisationPolicy)
public int getMaxIdle()
public int getMaxActive()
public long getMaxWait()
public int getExhaustedAction()
public int getInitialisationPolicy()
public void setInitialisationPolicy(int policy)
public void setMaxIdle(int maxIdle)
public void setMaxActive(int maxActive)
public void setMaxWait(long maxWait)
public void setExhaustedAction(int exhaustedAction)
public int getMinEvictionMillis()
public void setMinEvictionMillis(int minEvictionMillis)
public int getEvictionCheckIntervalMillis()
public void setEvictionCheckIntervalMillis(int evictionCheckIntervalMillis)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.