00001 #ifndef CONNECTIONPOOLCONFIGURATIONBUILDER_H_
00002 #define CONNECTIONPOOLCONFIGURATIONBUILDER_H_
00003
00004 #include "infinispan/hotrod/ImportExport.h"
00005 #include "Builder.h"
00006 #include "ConfigurationChildBuilder.h"
00007
00008 namespace infinispan {
00009 namespace hotrod {
00010
00016 class HR_EXTERN ConnectionPoolConfigurationBuilder
00017 : public Builder<ConnectionPoolConfiguration>, public ConfigurationChildBuilder
00018 {
00019 public:
00020 ConnectionPoolConfigurationBuilder(ConfigurationBuilder& builder);
00021
00028 ConnectionPoolConfigurationBuilder& exhaustedAction(ExhaustedAction exhaustedAction_);
00029
00038 ConnectionPoolConfigurationBuilder& lifo(bool lifo_);
00039
00049 ConnectionPoolConfigurationBuilder& maxActive(int maxActive_);
00050
00059 ConnectionPoolConfigurationBuilder& maxTotal(int maxTotal_);
00060
00068 ConnectionPoolConfigurationBuilder& maxWait(long maxWait_);
00069
00077 ConnectionPoolConfigurationBuilder& maxIdle(int maxIdle_);
00078
00088 ConnectionPoolConfigurationBuilder& minIdle(int minIdle_);
00089
00096 ConnectionPoolConfigurationBuilder& numTestsPerEvictionRun(int numTestsPerEvictionRun_);
00097
00105 ConnectionPoolConfigurationBuilder& timeBetweenEvictionRuns(int timeBetweenEvictionRuns_);
00106
00116 ConnectionPoolConfigurationBuilder& minEvictableIdleTime(int minEvictableIdleTime_);
00117
00125 ConnectionPoolConfigurationBuilder& testOnBorrow(bool testOnBorrow_);
00126
00134 ConnectionPoolConfigurationBuilder& testOnReturn(bool testOnReturn_);
00135
00144 ConnectionPoolConfigurationBuilder& testWhileIdle(bool testWhileIdle_);
00145
00146 virtual ConnectionPoolConfiguration create();
00147 virtual ConnectionPoolConfigurationBuilder& read(ConnectionPoolConfiguration& bean);
00148
00149 private:
00150 ExhaustedAction m_exhaustedAction;
00151 bool m_lifo;
00152 int m_maxActive;
00153 int m_maxTotal;
00154 long m_maxWait;
00155 int m_maxIdle;
00156 int m_minIdle;
00157 int m_numTestsPerEvictionRun;
00158 int m_timeBetweenEvictionRuns;
00159 int m_minEvictableIdleTime;
00160 bool m_testOnBorrow;
00161 bool m_testOnReturn;
00162 bool m_testWhileIdle;
00163 };
00164
00165 }}
00166 #endif