org.apache.jcs.utils.threadpool.behavior
Interface IPoolConfiguration

All Known Implementing Classes:
PoolConfiguration

public interface IPoolConfiguration

This provides values to use for the when-blocked-policy.

Author:
aaronsm

Field Summary
static java.lang.String POLICY_ABORT
          abort when queue is full and max threads is reached.
static java.lang.String POLICY_BLOCK
          block when queue is full and max threads is reached.
static java.lang.String POLICY_DISCARDOLDEST
          discard oldest when queue is full and max threads is reached.
static java.lang.String POLICY_RUN
          run in current thread when queue is full and max threads is reached.
static java.lang.String POLICY_WAIT
          wait when queue is full and max threads is reached.
 
Method Summary
 int getBoundarySize()
           
 int getKeepAliveTime()
           
 int getMaximumPoolSize()
           
 int getMinimumPoolSize()
           
 int getStartUpSize()
           
 java.lang.String getWhenBlockedPolicy()
           
 boolean isUseBoundary()
           
 void setBoundarySize(int boundarySize)
           
 void setKeepAliveTime(int keepAliveTime)
           
 void setMaximumPoolSize(int maximumPoolSize)
           
 void setMinimumPoolSize(int minimumPoolSize)
           
 void setStartUpSize(int startUpSize)
           
 void setUseBoundary(boolean useBoundary)
           
 void setWhenBlockedPolicy(java.lang.String whenBlockedPolicy)
          should be ABORT, BLOCK, RUN, WAIT, DISCARDOLDEST.
 

Field Detail

POLICY_ABORT

static final java.lang.String POLICY_ABORT
abort when queue is full and max threads is reached.

See Also:
Constant Field Values

POLICY_BLOCK

static final java.lang.String POLICY_BLOCK
block when queue is full and max threads is reached.

See Also:
Constant Field Values

POLICY_RUN

static final java.lang.String POLICY_RUN
run in current thread when queue is full and max threads is reached.

See Also:
Constant Field Values

POLICY_WAIT

static final java.lang.String POLICY_WAIT
wait when queue is full and max threads is reached.

See Also:
Constant Field Values

POLICY_DISCARDOLDEST

static final java.lang.String POLICY_DISCARDOLDEST
discard oldest when queue is full and max threads is reached.

See Also:
Constant Field Values
Method Detail

setUseBoundary

void setUseBoundary(boolean useBoundary)
Parameters:
useBoundary - The useBoundary to set.

isUseBoundary

boolean isUseBoundary()
Returns:
Returns the useBoundary.

setBoundarySize

void setBoundarySize(int boundarySize)
Parameters:
boundarySize - The boundarySize to set.

getBoundarySize

int getBoundarySize()
Returns:
Returns the boundarySize.

setMaximumPoolSize

void setMaximumPoolSize(int maximumPoolSize)
Parameters:
maximumPoolSize - The maximumPoolSize to set.

getMaximumPoolSize

int getMaximumPoolSize()
Returns:
Returns the maximumPoolSize.

setMinimumPoolSize

void setMinimumPoolSize(int minimumPoolSize)
Parameters:
minimumPoolSize - The minimumPoolSize to set.

getMinimumPoolSize

int getMinimumPoolSize()
Returns:
Returns the minimumPoolSize.

setKeepAliveTime

void setKeepAliveTime(int keepAliveTime)
Parameters:
keepAliveTime - The keepAliveTime to set.

getKeepAliveTime

int getKeepAliveTime()
Returns:
Returns the keepAliveTime.

setWhenBlockedPolicy

void setWhenBlockedPolicy(java.lang.String whenBlockedPolicy)
should be ABORT, BLOCK, RUN, WAIT, DISCARDOLDEST.

If an incorrect value is returned, RUN will be used.

Parameters:
whenBlockedPolicy - The whenBlockedPolicy to set.

getWhenBlockedPolicy

java.lang.String getWhenBlockedPolicy()
Returns:
Returns the whenBlockedPolicy.

setStartUpSize

void setStartUpSize(int startUpSize)
Parameters:
startUpSize - The startUpSize to set.

getStartUpSize

int getStartUpSize()
Returns:
Returns the startUpSize.


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.