|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scale7.cassandra.pelops.pool.CommonsBackedPool.Policy
public static class CommonsBackedPool.Policy
Constructor Summary | |
---|---|
CommonsBackedPool.Policy()
|
Method Summary | |
---|---|
int |
getMaxActivePerNode()
|
int |
getMaxIdlePerNode()
|
int |
getMaxTotal()
|
int |
getMaxWaitForConnection()
|
int |
getMinIdlePerNode()
|
int |
getTimeBetweenScheduledMaintenanceTaskRunsMillis()
|
boolean |
isTestConnectionsWhileIdle()
|
void |
setMaxActivePerNode(int maxActivePerNode)
Sets the cap on the number of object instances managed by the pool per node. |
void |
setMaxIdlePerNode(int maxIdlePerNode)
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 nodes combined. |
void |
setMaxWaitForConnection(int maxWaitForConnection)
Sets the maximum amount of time (in milliseconds) the CommonsBackedPool.getConnection() method should
wait before throwing an exception when the pool is exhausted. |
void |
setMinIdlePerNode(int minIdlePerNode)
Sets the minimum number of idle objects to maintain in each of the nodes. |
void |
setTestConnectionsWhileIdle(boolean testConnectionsWhileIdle)
When true, connections will be validated by scheduled tasks thread (if enabled). |
void |
setTimeBetweenScheduledMaintenanceTaskRunsMillis(int timeBetweenScheduledMaintenanceTaskRunsMillis)
Sets the number of milliseconds to sleep between runs of the idle object tasks thread. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CommonsBackedPool.Policy()
Method Detail |
---|
public int getMaxActivePerNode()
setMaxActivePerNode(int)
public void setMaxActivePerNode(int maxActivePerNode)
maxActivePerNode
- The cap on the number of object instances per node. Use a negative value for no limit.public int getMaxIdlePerNode()
setMaxActivePerNode(int)
public void setMaxIdlePerNode(int maxIdlePerNode)
maxIdlePerNode
- public int getMaxTotal()
setMaxTotal(int)
public void setMaxTotal(int maxTotal)
CommonsBackedPool.getConnection()
is invoked when at the limit with no idle instances
available, an attempt is made to create room by clearing the oldest 15% of the elements from the keyed pools.
maxTotal
- The cap on the number of object instances per node. Use a negative value for no limit.public int getMinIdlePerNode()
setMinIdlePerNode(int)
public void setMinIdlePerNode(int minIdlePerNode)
minIdlePerNode
- The minimum size of the each nodes poolpublic int getMaxWaitForConnection()
setMaxWaitForConnection(int)
public void setMaxWaitForConnection(int maxWaitForConnection)
CommonsBackedPool.getConnection()
method should
wait before throwing an exception when the pool is exhausted. When less than or equal to 0, the
CommonsBackedPool.getConnection()
method may block indefinitely.
maxWaitForConnection
- the maximum number of milliseconds CommonsBackedPool.getConnection()
will block or negative for indefinitely.public int getTimeBetweenScheduledMaintenanceTaskRunsMillis()
setTimeBetweenScheduledMaintenanceTaskRunsMillis(int)
public void setTimeBetweenScheduledMaintenanceTaskRunsMillis(int timeBetweenScheduledMaintenanceTaskRunsMillis)
timeBetweenScheduledMaintenanceTaskRunsMillis
- milliseconds to sleep between evictor runs.public boolean isTestConnectionsWhileIdle()
setTestConnectionsWhileIdle(boolean)
public void setTestConnectionsWhileIdle(boolean testConnectionsWhileIdle)
testConnectionsWhileIdle
- true if enabled, otherwise falsepublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |