1 #ifndef ISPN_HOTROD_CONFIGURATION_H 2 #define ISPN_HOTROD_CONFIGURATION_H 47 int _connectionTimeout,
48 bool _forceReturnValue,
50 std::map<std::string,std::vector<ServerConfiguration> > _serversConfiguration,
54 int _valueSizeEstimate,
58 const event::EventMarshaller &eventMarshaller = event::JBasicEventMarshaller()):
59 protocolVersion(_protocolVersion), protocolVersionPtr(),
60 connectionPoolConfiguration(_connectionPoolConfiguration),
61 connectionTimeout(_connectionTimeout), forceReturnValue(_forceReturnValue),
62 keySizeEstimate(_keySizeEstimate),
63 serversMap(_serversConfiguration),
64 socketTimeout(_socketTimeout), securityConfiguration(_sslConfiguration),tcpNoDelay(_tcpNoDelay),
65 valueSizeEstimate(_valueSizeEstimate), maxRetries(_maxRetries), nearCacheConfiguration(_nearCacheConfiguration), balancingStrategyProducer(bsp),
66 eventMarshaller(eventMarshaller)
71 int _connectionTimeout,
72 bool _forceReturnValue,
74 std::map<std::string,std::vector<ServerConfiguration> > _serversConfiguration,
78 int _valueSizeEstimate,
82 const event::EventMarshaller &eventMarshaller = event::JBasicEventMarshaller()):
83 protocolVersion(_protocolVersion), protocolVersionPtr(),
84 connectionPoolConfiguration(_connectionPoolConfiguration),
85 connectionTimeout(_connectionTimeout), forceReturnValue(_forceReturnValue),
86 keySizeEstimate(_keySizeEstimate),
87 serversMap(_serversConfiguration),
88 socketTimeout(_socketTimeout), securityConfiguration(_securityConfiguration),tcpNoDelay(_tcpNoDelay),
89 valueSizeEstimate(_valueSizeEstimate), maxRetries(_maxRetries), nearCacheConfiguration(_nearCacheConfiguration), balancingStrategyProducer(bsp),
90 eventMarshaller(eventMarshaller)
99 if (protocolVersionPtr.get() == NULL) {
101 .reset(
new std::string(protocolVersion.c_str()));
103 return *(protocolVersionPtr.get());
150 std::map<std::string, std::vector<ServerConfiguration> > temp;
200 std::string protocolVersion;
201 std::shared_ptr<std::string> protocolVersionPtr;
203 int connectionTimeout;
204 bool forceReturnValue;
206 std::map<std::string,std::vector<ServerConfiguration> > serversMap;
210 int valueSizeEstimate;
214 const event::EventMarshaller &eventMarshaller;
216 static void deleteString(std::string *str) {
delete str; }
static HR_EXTERN const char * PROTOCOL_VERSION_10
Definition: Configuration.h:31
const NearCacheConfiguration & getNearCacheConfiguration() const
Definition: Configuration.h:195
HR_EXTERN const event::EventMarshaller & getEventMarshaller() const
static HR_EXTERN const char * PROTOCOL_VERSION_20
Definition: Configuration.h:35
const SecurityConfiguration & getSecurityConfiguration() const
Definition: Configuration.h:197
static HR_EXTERN const char * PROTOCOL_VERSION_13
Definition: Configuration.h:34
HR_EXTERN const int & getSocketTimeout() const
HR_EXTERN const int & getValueSizeEstimate() const
#define HR_EXTERN
Definition: ImportExport.h:35
static HR_EXTERN const char * PROTOCOL_VERSION_21
Definition: Configuration.h:36
static HR_EXTERN const char * PROTOCOL_VERSION_23
Definition: Configuration.h:38
Definition: NearCacheConfiguration.h:32
Configuration(const std::string &_protocolVersion, const ConnectionPoolConfiguration &_connectionPoolConfiguration, int _connectionTimeout, bool _forceReturnValue, int _keySizeEstimate, std::map< std::string, std::vector< ServerConfiguration > > _serversConfiguration, int _socketTimeout, const SslConfiguration _sslConfiguration, bool _tcpNoDelay, int _valueSizeEstimate, int _maxRetries, NearCacheConfiguration _nearCacheConfiguration, FailOverRequestBalancingStrategy::ProducerFn bsp=0, const event::EventMarshaller &eventMarshaller=event::JBasicEventMarshaller())
Definition: Configuration.h:45
HR_EXTERN const int & getKeySizeEstimate() const
static HR_EXTERN const char * PROTOCOL_VERSION_26
Definition: Configuration.h:41
static HR_EXTERN const char * PROTOCOL_VERSION_11
Definition: Configuration.h:32
static HR_EXTERN const char * PROTOCOL_VERSION_24
Definition: Configuration.h:39
Definition: AuthenticationConfiguration.h:10
HR_EXTERN const int & getMaxRetries() const
HR_EXTERN const SslConfiguration & getSslConfiguration() const
HR_EXTERN const std::string & getProtocolVersion() const
Definition: Configuration.h:98
HR_EXTERN const bool & isForceReturnValue() const
Definition: SslConfiguration.h:10
HR_EXTERN const int & getConnectionTimeout() const
Definition: Configuration.h:28
static HR_EXTERN const char * PROTOCOL_VERSION_22
Definition: Configuration.h:37
FailOverRequestBalancingStrategy *(* ProducerFn)()
Definition: FailOverRequestBalancingStrategy.h:19
HR_EXTERN const char * getProtocolVersionCString() const
std::map< std::string, std::vector< ServerConfiguration > > getServersMapConfiguration() const
Definition: Configuration.h:149
HR_EXTERN const bool & isTcpNoDelay() const
static HR_EXTERN const char * PROTOCOL_VERSION_12
Definition: Configuration.h:33
const SslConfiguration & getSslConfiguration()
Definition: Configuration.h:191
Definition: SecurityConfiguration.h:16
static HR_EXTERN const char * DEFAULT_CLUSTER_NAME
Definition: Configuration.h:42
HR_EXTERN const ConnectionPoolConfiguration & getConnectionPoolConfiguration() const
static HR_EXTERN const char * PROTOCOL_VERSION_25
Definition: Configuration.h:40
Configuration(const std::string &_protocolVersion, const ConnectionPoolConfiguration &_connectionPoolConfiguration, int _connectionTimeout, bool _forceReturnValue, int _keySizeEstimate, std::map< std::string, std::vector< ServerConfiguration > > _serversConfiguration, int _socketTimeout, const SecurityConfiguration _securityConfiguration, bool _tcpNoDelay, int _valueSizeEstimate, int _maxRetries, NearCacheConfiguration _nearCacheConfiguration, FailOverRequestBalancingStrategy::ProducerFn bsp=0, const event::EventMarshaller &eventMarshaller=event::JBasicEventMarshaller())
Definition: Configuration.h:69
Definition: ConnectionPoolConfiguration.h:21
const SslConfiguration & getSslConfiguration() const
Definition: SecurityConfiguration.h:23
HR_EXTERN FailOverRequestBalancingStrategy::ProducerFn getBalancingStrategy() const