26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_ABSTRACTCONNECTIONPOOL_H
27 #define __TERRALIB_DATAACCESS_INTERNAL_ABSTRACTCONNECTIONPOOL_H
30 #include "../Config.h"
36 #include <boost/utility.hpp>
This class defines the basic interface for a connection pool.
virtual std::size_t getMinPoolSize() const =0
It returns the minimum number of connections managed by the pool.
virtual std::size_t getInitialPoolSize() const =0
It returns the initial number of connections opened by the pool at its startup.
virtual void setMinPoolSize(std::size_t size)=0
It sets the minimum number of connections managed by the pool.
virtual bool isInitialized() const =0
It returns true if the connection pool is initialized, otherwise it returns false.
virtual ~AbstractConnectionPool()
Virtual destructor.
virtual void idle()=0
It releases the connections that are not in use for a long time.
virtual void initialize()=0
It initializes the connections to be managed by the pool.
virtual std::size_t getPoolSize() const =0
It returns the number of connections in the pool.
virtual void finalize()=0
It closes all connections and clears all resources managed by the pool.
AbstractConnectionPool()
Default constructor.
virtual std::size_t getMaxPoolSize() const =0
It returns the maximum number of connections managed by the pool.
virtual bool isValid() const =0
It checks if all the connections in the pool are valid (the communication channel is ok).
virtual void setInitialPoolSize(std::size_t size)=0
It sets the initial number of connections opened by the pool at its startup.
virtual void setMaxPoolSize(std::size_t size)=0
It sets the maximum number of connections managed by the pool.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.