include/infinispan/hotrod/ConnectionPoolConfiguration.h

Go to the documentation of this file.
00001 #ifndef CONNECTIONPOOLCONFIGURATION_H_
00002 #define CONNECTIONPOOLCONFIGURATION_H_
00003 
00004 #include "infinispan/hotrod/ImportExport.h"
00005 
00006 namespace infinispan {
00007 namespace hotrod {
00008 
00009 #ifdef CREATE_NEW
00010 #define WINDOWS_WORKAROUND_CREATE_NEW CREATE_NEW
00011 #undef CREATE_NEW
00012 #endif
00013 
00014 enum ExhaustedAction { EXCEPTION, WAIT, CREATE_NEW };
00015 
00016 #ifdef WINDOWS_WORKAROUND_CREATE_NEW
00017 #define CREATE_NEW WINDOWS_WORKAROUND_CREATE_NEW
00018 #undef WINDOWS_WORKAROUND_CREATE_NEW
00019 #endif
00020 
00021 class HR_EXTERN ConnectionPoolConfiguration
00022 {
00023   public:
00024     ConnectionPoolConfiguration(ExhaustedAction exhaustedAction,
00025         bool lifo,
00026         int maxActive,
00027         int maxTotal,
00028         long maxWait,
00029         int maxIdle,
00030         int minIdle,
00031         int numTestsPerEvictionRun,
00032         int timeBetweenEvictionRuns,
00033         int minEvictableIdleTime,
00034         bool testOnBorrow,
00035         bool testOnReturn,
00036         bool testWhileIdle);
00037 
00038     const ExhaustedAction& getExhaustedAction() const;
00039     const bool& isLifo() const;
00040     const int& getMaxActive() const;
00041     const int& getMaxTotal() const;
00042     const long& getMaxWait() const;
00043     const int& getMaxIdle() const;
00044     const int& getMinIdle() const;
00045     const int& getNumTestsPerEvictionRun() const;
00046     const int& getTimeBetweenEvictionRuns() const;
00047     const int& getMinEvictableIdleTime() const;
00048     const bool& isTestOnBorrow() const;
00049     const bool& isTestOnReturn() const;
00050     const bool& isTestWhileIdle() const;
00051 
00052   private:
00053     ConnectionPoolConfiguration() {
00054         // private so that it cannot be invoked
00055     }
00056 
00057     ExhaustedAction exhaustedAction;
00058     bool lifo;
00059     int maxActive;
00060     int maxTotal;
00061     long maxWait;
00062     int maxIdle;
00063     int minIdle;
00064     int numTestsPerEvictionRun;
00065     int timeBetweenEvictionRuns;
00066     int minEvictableIdleTime;
00067     bool testOnBorrow;
00068     bool testOnReturn;
00069     bool testWhileIdle;
00070 };
00071 
00072 }
00073 }
00074 
00075 #endif /* CONNECTIONPOOLCONFIGURATION_H_ */

Generated on 26 Mar 2014 for InfinispanHotRodC++Client by  doxygen 1.4.7