com.cafesoft.core.jdbc
Class StandardConnectionPoolConfig

java.lang.Object
  |
  +--com.cafesoft.core.jdbc.StandardConnectionPoolConfig
All Implemented Interfaces:
ConnectionPoolConfig

public class StandardConnectionPoolConfig
extends Object
implements ConnectionPoolConfig

Standard implementation of the ConnectionPoolConfig Object

Since:
10/31/02
See Also:
ConnectionPoolConfig

Constructor Summary
StandardConnectionPoolConfig(String poolName, int initialCapacity, int minimumCapacity, int maximumCapacity, int poolIncrement, boolean allowShrinking, int shrinkPeriod, int refreshPeriod, String poolUser, String poolPassword, ConnectionConfig connConfig)
          Create a new StandardConnectionPoolConfig object
 
Method Summary
 boolean allowShrinking()
          Determine if Shrinking of Connections is allowed
 ConnectionConfig getConnectionConfig()
          Get the ConnectionConfig object
 int getIncrement()
          Get the increment of the ConnectionPool
 int getInitial()
          Get the initialCapacity of the ConnectionPool
 int getMaximum()
          Get the maximum capacity of the ConnectionPool
 int getMinimum()
          Get the minimum capacity of the ConnectionPool
 String getName()
          Get the name of the ConnectionPool
 String getPoolPassword()
          Get the ConnectionPool's Password
 String getPoolUser()
          Get the ConnectionPool's User
 int getRefreshPeriod()
          Get the refresh period (in Minutes)
 int getShrinkPeriod()
          Get the shrink period (in Minutes)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardConnectionPoolConfig

public StandardConnectionPoolConfig(String poolName,
                                    int initialCapacity,
                                    int minimumCapacity,
                                    int maximumCapacity,
                                    int poolIncrement,
                                    boolean allowShrinking,
                                    int shrinkPeriod,
                                    int refreshPeriod,
                                    String poolUser,
                                    String poolPassword,
                                    ConnectionConfig connConfig)
Create a new StandardConnectionPoolConfig object

Parameters:
poolName - the name of the ConnectionPool
initialCapacity - the initial capacity of the pool
minimumCapacity - the minimum capacity of the pool
maximumCapacity - the maximum capacity of the pool
poolIncrement - the increment at which new connections are created
allowShrinking - flag to enable/disable shrinking of inactive connections
shrinkPeriod - the shrink period (in minutes)
refreshPeriod - the refresh period (in minutes)
poolUser - the ConnectionPool's user
poolPassword - the ConnectionPool's password
connConfig - the ConnectionConfig object containing all Connection configuration properties
Method Detail

getName

public final String getName()
Get the name of the ConnectionPool

Specified by:
getName in interface ConnectionPoolConfig
Returns:
the name of the ConnectionPool

getInitial

public final int getInitial()
Get the initialCapacity of the ConnectionPool

Specified by:
getInitial in interface ConnectionPoolConfig
Returns:
the initial capacity of the ConnectionPool

getMinimum

public final int getMinimum()
Get the minimum capacity of the ConnectionPool

Specified by:
getMinimum in interface ConnectionPoolConfig
Returns:
the minimum capacity of the ConnectionPool

getMaximum

public final int getMaximum()
Get the maximum capacity of the ConnectionPool

Specified by:
getMaximum in interface ConnectionPoolConfig
Returns:
the maximum capacity of the ConnectionPool

getIncrement

public final int getIncrement()
Get the increment of the ConnectionPool

Specified by:
getIncrement in interface ConnectionPoolConfig
Returns:
the value at which the number of Connections objects contained by the pool are incremented

allowShrinking

public final boolean allowShrinking()
Determine if Shrinking of Connections is allowed

Specified by:
allowShrinking in interface ConnectionPoolConfig
Returns:
boolean which indicates if shrinking inactive Connections is allowed (true indicates shrinking is enabled)

getShrinkPeriod

public final int getShrinkPeriod()
Get the shrink period (in Minutes)

Specified by:
getShrinkPeriod in interface ConnectionPoolConfig
Returns:
the shrink period in minutes

getRefreshPeriod

public final int getRefreshPeriod()
Get the refresh period (in Minutes)

Specified by:
getRefreshPeriod in interface ConnectionPoolConfig
Returns:
the refresh period in minutes

getPoolUser

public String getPoolUser()
Get the ConnectionPool's User

Specified by:
getPoolUser in interface ConnectionPoolConfig
Returns:
the ConnectionPool's User

getPoolPassword

public String getPoolPassword()
Get the ConnectionPool's Password

Specified by:
getPoolPassword in interface ConnectionPoolConfig
Returns:
the ConnectionPool's Password

getConnectionConfig

public final ConnectionConfig getConnectionConfig()
Get the ConnectionConfig object

Specified by:
getConnectionConfig in interface ConnectionPoolConfig
Returns:
the ConnectionConfig object


Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.