com.mymed.controller.core.manager.connection
Interface IConnectionPool

All Known Implementing Classes:
ConnectionPool

public interface IConnectionPool

Common interface for the implementation of a pool

Author:
Milo Casagrande

Method Summary
 void checkIn(IConnection connection)
          Give a connection back to the pool
 IConnection checkOut()
          Get a connection from the pool
 int getCapacity()
          Get the maximum capacity of the pool
 int getSize()
          Get the size of the pool, or how many connections are in it
 

Method Detail

checkOut

IConnection checkOut()
Get a connection from the pool

Returns:
the first available connection

checkIn

void checkIn(IConnection connection)
Give a connection back to the pool

Parameters:
connection - the connection to return to the pool

getSize

int getSize()
Get the size of the pool, or how many connections are in it

Returns:
the actual size of the pool

getCapacity

int getCapacity()
Get the maximum capacity of the pool

Returns:
the maximum capacity of the pool