00001 #ifndef ISPN_HOTROD_CONFIGURATION_H
00002 #define ISPN_HOTROD_CONFIGURATION_H
00003
00004
00005
00006 #include <string>
00007 #include <vector>
00008 #include "infinispan/hotrod/ImportExport.h"
00009 #include "ConnectionPoolConfiguration.h"
00010 #include "ServerConfiguration.h"
00011 #include "SslConfiguration.h"
00012
00013 namespace infinispan {
00014 namespace hotrod {
00015
00021 class HR_EXTERN Configuration
00022 {
00023 public:
00024 static const char* PROTOCOL_VERSION_10;
00025 static const char* PROTOCOL_VERSION_11;
00026 static const char* PROTOCOL_VERSION_12;
00027
00028 Configuration(std::string protocolVersion,
00029 const ConnectionPoolConfiguration& connectionPoolConfiguration,
00030 int connectionTimeout,
00031 bool forceReturnValue,
00032 int keySizeEstimate,
00033 bool pingOnStartup,
00034 std::vector<ServerConfiguration> serversConfiguration,
00035 int socketTimeout,
00036 const SslConfiguration sslConfiguration,
00037 bool tcpNoDelay,
00038 int valueSizeEstimate);
00039
00047 const std::string& getProtocolVersion() const;
00048
00054 const ConnectionPoolConfiguration& getConnectionPoolConfiguration() const;
00055
00062 const int& getConnectionTimeout() const;
00063
00071 const bool& isForceReturnValue() const;
00072
00078 const int& getKeySizeEstimate() const;
00079
00086 const bool& isPingOnStartup() const;
00087
00094 const std::vector<ServerConfiguration>& getServersConfiguration() const;
00095
00101 const int& getSocketTimeout() const;
00102
00108 const SslConfiguration& getSslConfiguration() const;
00109
00115 const bool& isTcpNoDelay() const;
00116
00122 const int& getValueSizeEstimate() const;
00123
00124 private:
00125 std::string protocolVersion;
00126 ConnectionPoolConfiguration connectionPoolConfiguration;
00127 int connectionTimeout;
00128 bool forceReturnValue;
00129 int keySizeEstimate;
00130 bool pingOnStartup;
00131 std::vector<ServerConfiguration> servers;
00132 int socketTimeout;
00133 SslConfiguration sslConfiguration;
00134 bool tcpNoDelay;
00135 int valueSizeEstimate;
00136 };
00137
00138 }}
00139
00140 #endif