edu.ucsb.adl.bucket99
Class ConnectionPool.Status

java.lang.Object
  |
  +--edu.ucsb.adl.bucket99.ConnectionPool.Status
Enclosing class:
ConnectionPool

public static final class ConnectionPool.Status
extends java.lang.Object

Describes the status of a connection pool.


Constructor Summary
ConnectionPool.Status(int minimum, int maximum)
          Creates a Status.
 
Method Summary
 int getCurrent()
          Returns the current number of connections in the pool.
 int getInUse()
          Returns the number of connections that are currently in use.
 int getMaximum()
          Returns the maximum number of connections in the pool.
 int getMinimum()
          Returns the minimum number of connections the pool attempts to maintain.
 void update(int current, int inUse)
          Updates the status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionPool.Status

public ConnectionPool.Status(int minimum,
                             int maximum)
Creates a Status.

Parameters:
minimum - The minimum number of connections the pool attempts to maintain.
maximum - The maximum number of connections in the pool.
Method Detail

update

public void update(int current,
                   int inUse)
Updates the status. For use by ConnectionPool only.

Parameters:
current - The current number of connections in the pool.
inUse - The number of connections that are currently in use.

getMinimum

public int getMinimum()
Returns the minimum number of connections the pool attempts to maintain.

Returns:
The minimum number.

getMaximum

public int getMaximum()
Returns the maximum number of connections in the pool.

Returns:
The maximum number.

getCurrent

public int getCurrent()
Returns the current number of connections in the pool.

Returns:
The current number.

getInUse

public int getInUse()
Returns the number of connections that are currently in use.

Returns:
The number currently in use.