Pivotal GemFire Native Client Cache Reference  9.0.6
PoolFactory.hpp
Go to the documentation of this file.
1 #ifndef __GEMFIRE_POOL_FACTORY_HPP__
2 #define __GEMFIRE_POOL_FACTORY_HPP__
3 /*=========================================================================
4  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
5  * This product is protected by U.S. and international copyright
6  * and intellectual property laws. Pivotal products are covered by
7  * more patents listed at http://www.pivotal.io/patents.
8  *========================================================================
9  */
10 
11 #include "gfcpp_globals.hpp"
12 #include "SharedBase.hpp"
13 #include "gf_types.hpp"
14 #include "Pool.hpp"
15 
20 namespace gemfire {
21 
22 class CacheImpl;
23 class PoolAttributes;
24 
52 public:
53 
59  static const int DEFAULT_FREE_CONNECTION_TIMEOUT = 10000;
60 
67  static const int DEFAULT_LOAD_CONDITIONING_INTERVAL = 1000*60*5;
68 
73  static const int DEFAULT_SOCKET_BUFFER_SIZE = 32768;
74 
79  static const int DEFAULT_READ_TIMEOUT = 10000;
80 
85  static const int DEFAULT_MIN_CONNECTIONS = 1;
86 
91  static const int DEFAULT_MAX_CONNECTIONS = -1;
92 
97  static const long DEFAULT_IDLE_TIMEOUT = 5000;
98 
103  static const int DEFAULT_RETRY_ATTEMPTS = -1;
104 
109  static const long DEFAULT_PING_INTERVAL = 10000;
110 
115  static const long DEFAULT_UPDATE_LOCATOR_LIST_INTERVAL = 5000;
116 
122  static const int DEFAULT_STATISTIC_INTERVAL = -1;
123 
129  //static const bool DEFAULT_THREAD_LOCAL_CONNECTIONS = false;
130 
135  static const bool DEFAULT_SUBSCRIPTION_ENABLED = false;
136 
142  static const int DEFAULT_SUBSCRIPTION_REDUNDANCY = 0;
143 
150  static const int DEFAULT_SUBSCRIPTION_MESSAGE_TRACKING_TIMEOUT = 900000;
151 
158  static const int DEFAULT_SUBSCRIPTION_ACK_INTERVAL = 100;
159 
164  static const char* DEFAULT_SERVER_GROUP;
169  static const bool DEFAULT_THREAD_LOCAL_CONN = false;
170 
175  static const bool DEFAULT_MULTIUSER_SECURE_MODE = false;
176 
181  static const bool DEFAULT_PR_SINGLE_HOP_ENABLED = true;
182 
197  void setFreeConnectionTimeout(int connectionTimeout);
209  void setLoadConditioningInterval(int loadConditioningInterval);
221  void setSocketBufferSize(int bufferSize);
222 
238  void setThreadLocalConnections(bool threadLocalConnections);
239 
248  void setReadTimeout(int timeout);
249 
261  void setMinConnections(int minConnections);
262 
274  void setMaxConnections(int maxConnections);
275 
287  void setIdleTimeout(long idleTimeout);
288 
298  void setRetryAttempts(int retryAttempts);
299 
315  void setPingInterval(long pingInterval);
316 
323  void setUpdateLocatorListInterval(long updateLocatorListInterval);
324 
337  void setStatisticInterval(int statisticInterval);
338 
345  void setServerGroup(const char* group);
346 
359  void addLocator(const char* host, int port);
360 
373  void addServer(const char* host, int port);
374 
382  void setSubscriptionEnabled(bool enabled);
394  void setSubscriptionRedundancy(int redundancy);
406  void setSubscriptionMessageTrackingTimeout(int messageTrackingTimeout);
407 
419  void setSubscriptionAckInterval(int ackInterval);
420 
421 
427  void setMultiuserAuthentication(bool multiuserAuthentication);
428 
433  void reset();
434 
444  PoolPtr create(const char* name);
445 
464  void setPRSingleHopEnabled(bool enabled);
465 
466  ~PoolFactory();
467 
468 private:
469  PoolFactory( );
470  PoolFactory(const PoolFactory&);
471  void addCheck( const char* host, int port );
472  PoolAttributesPtr m_attrs;
473  bool m_isSubscriptionRedundancy;
474  bool m_addedServerOrLocator;
475  friend class Cache;
476  friend class PoolManager;
477  friend class CacheFactory;
478  friend class CacheXmlCreation;
479 };
480 } //namespace gemfire
481 #endif //ifndef __GEMFIRE_POOL_FACTORY_HPP__
Top level class for configuring and using GemFire on a client.This should be called once to create Ca...
Definition: CacheFactory.hpp:33
static const char * DEFAULT_SERVER_GROUP
The default server group.
Definition: PoolFactory.hpp:164
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
Manages creation and access to connection pools for clients.
Definition: PoolManager.hpp:32
#define CPPCACHE_EXPORT
Defines a GemFire CPPCACHE export.
Definition: gf_base.hpp:51
This abstract base class is the base class of all user objects that have the shared capability of ref...
Definition: SharedBase.hpp:31
This interface provides for the configuration and creation of instances of Pool.
Definition: PoolFactory.hpp:51
Cache are obtained from create method on the CacheFactory#create class.
Definition: Cache.hpp:44
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:35

GemFire C++ Cache API Documentation