public class PoolConfiguration extends java.lang.Object implements java.lang.Cloneable, IPoolConfiguration
POLICY_ABORT, POLICY_BLOCK, POLICY_DISCARDOLDEST, POLICY_RUN, POLICY_WAIT
Constructor and Description |
---|
PoolConfiguration()
Default
|
PoolConfiguration(boolean useBoundary,
int boundarySize,
int maximumPoolSize,
int minimumPoolSize,
int keepAliveTime,
java.lang.String whenBlockedPolicy,
int startUpSize)
Construct a completely configured instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Copies the instance variables to another instance.
|
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.
|
java.lang.String |
toString()
To string for debugging purposes.
|
public PoolConfiguration()
public PoolConfiguration(boolean useBoundary, int boundarySize, int maximumPoolSize, int minimumPoolSize, int keepAliveTime, java.lang.String whenBlockedPolicy, int startUpSize)
useBoundary
- boundarySize
- maximumPoolSize
- minimumPoolSize
- keepAliveTime
- whenBlockedPolicy
- startUpSize
- public void setUseBoundary(boolean useBoundary)
setUseBoundary
in interface IPoolConfiguration
useBoundary
- The useBoundary to set.public boolean isUseBoundary()
isUseBoundary
in interface IPoolConfiguration
public void setBoundarySize(int boundarySize)
setBoundarySize
in interface IPoolConfiguration
boundarySize
- The boundarySize to set.public int getBoundarySize()
getBoundarySize
in interface IPoolConfiguration
public void setMaximumPoolSize(int maximumPoolSize)
setMaximumPoolSize
in interface IPoolConfiguration
maximumPoolSize
- The maximumPoolSize to set.public int getMaximumPoolSize()
getMaximumPoolSize
in interface IPoolConfiguration
public void setMinimumPoolSize(int minimumPoolSize)
setMinimumPoolSize
in interface IPoolConfiguration
minimumPoolSize
- The minimumPoolSize to set.public int getMinimumPoolSize()
getMinimumPoolSize
in interface IPoolConfiguration
public void setKeepAliveTime(int keepAliveTime)
setKeepAliveTime
in interface IPoolConfiguration
keepAliveTime
- The keepAliveTime to set.public int getKeepAliveTime()
getKeepAliveTime
in interface IPoolConfiguration
public void setWhenBlockedPolicy(java.lang.String whenBlockedPolicy)
IPoolConfiguration
If an incorrect value is returned, RUN will be used.
setWhenBlockedPolicy
in interface IPoolConfiguration
whenBlockedPolicy
- The whenBlockedPolicy to set.public java.lang.String getWhenBlockedPolicy()
getWhenBlockedPolicy
in interface IPoolConfiguration
public void setStartUpSize(int startUpSize)
setStartUpSize
in interface IPoolConfiguration
startUpSize
- The startUpSize to set.public int getStartUpSize()
getStartUpSize
in interface IPoolConfiguration
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.