build-artifacts/win/product/include/gfcpp/PoolFactory.hpp

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_POOL_FACTORY_HPP__
00002 #define __GEMFIRE_POOL_FACTORY_HPP__
00003 /*=========================================================================
00004  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
00005  * This product is protected by U.S. and international copyright
00006  * and intellectual property laws. Pivotal products are covered by
00007  * more patents listed at http://www.pivotal.io/patents.
00008  *========================================================================
00009  */
00010 
00011 #include "gfcpp_globals.hpp"
00012 #include "SharedBase.hpp"
00013 #include "gf_types.hpp"
00014 #include "Pool.hpp"
00015 
00020 namespace gemfire {
00021 
00022 class CacheImpl;
00023 class PoolAttributes;
00024 
00051 class CPPCACHE_EXPORT PoolFactory: public SharedBase {
00052 public:
00053 
00059   static const int DEFAULT_FREE_CONNECTION_TIMEOUT = 10000;
00060 
00067   static const int DEFAULT_LOAD_CONDITIONING_INTERVAL = 1000*60*5;
00068 
00073   static const int DEFAULT_SOCKET_BUFFER_SIZE = 32768;
00074 
00079   static const int DEFAULT_READ_TIMEOUT = 10000;
00080 
00085   static const int DEFAULT_MIN_CONNECTIONS = 1;
00086 
00091   static const int DEFAULT_MAX_CONNECTIONS = -1;
00092 
00097   static const long DEFAULT_IDLE_TIMEOUT = 5000;
00098 
00103   static const int DEFAULT_RETRY_ATTEMPTS = -1;
00104 
00109   static const long DEFAULT_PING_INTERVAL = 10000;
00110 
00115   static const long DEFAULT_UPDATE_LOCATOR_LIST_INTERVAL = 5000;
00116 
00122   static const int DEFAULT_STATISTIC_INTERVAL = -1;
00123 
00129   //static const bool DEFAULT_THREAD_LOCAL_CONNECTIONS = false;
00130 
00135   static const bool DEFAULT_SUBSCRIPTION_ENABLED = false;
00136 
00142   static const int DEFAULT_SUBSCRIPTION_REDUNDANCY = 0;
00143 
00150   static const int DEFAULT_SUBSCRIPTION_MESSAGE_TRACKING_TIMEOUT = 900000;
00151 
00158   static const int DEFAULT_SUBSCRIPTION_ACK_INTERVAL = 100;
00159 
00164   static const char* DEFAULT_SERVER_GROUP;
00169   static const bool DEFAULT_THREAD_LOCAL_CONN = false;
00170 
00175   static const bool DEFAULT_MULTIUSER_SECURE_MODE = false;
00176 
00181   static const bool DEFAULT_PR_SINGLE_HOP_ENABLED = true;
00182 
00197   void setFreeConnectionTimeout(int connectionTimeout);
00209   void setLoadConditioningInterval(int loadConditioningInterval);
00221   void setSocketBufferSize(int bufferSize);
00222 
00238   void setThreadLocalConnections(bool threadLocalConnections);
00239 
00248   void setReadTimeout(int timeout);
00249 
00261   void setMinConnections(int minConnections);
00262 
00274   void setMaxConnections(int maxConnections);
00275 
00287   void setIdleTimeout(long idleTimeout);
00288 
00298   void setRetryAttempts(int retryAttempts);
00299 
00315   void setPingInterval(long pingInterval);
00316 
00323   void setUpdateLocatorListInterval(long updateLocatorListInterval);
00324 
00337   void setStatisticInterval(int statisticInterval);
00338 
00345   void setServerGroup(const char* group);
00346 
00359   void addLocator(const char* host, int port);
00360 
00373   void addServer(const char* host, int port);
00374 
00382   void setSubscriptionEnabled(bool enabled);
00394   void setSubscriptionRedundancy(int redundancy);
00406   void setSubscriptionMessageTrackingTimeout(int messageTrackingTimeout);
00407 
00419   void setSubscriptionAckInterval(int ackInterval);
00420 
00421 
00427   void setMultiuserAuthentication(bool multiuserAuthentication);
00428 
00433   void reset();
00434 
00444   PoolPtr create(const char* name);
00445 
00464    void setPRSingleHopEnabled(bool enabled);
00465 
00466   ~PoolFactory();
00467 
00468 private:
00469   PoolFactory( );
00470   PoolFactory(const PoolFactory&);
00471   void addCheck( const char* host, int port );
00472   PoolAttributesPtr m_attrs;
00473   bool m_isSubscriptionRedundancy;
00474   bool m_addedServerOrLocator;
00475   friend class Cache;
00476   friend class PoolManager;
00477   friend class CacheFactory;
00478   friend class CacheXmlCreation;
00479 };
00480 } //namespace gemfire
00481 #endif //ifndef __GEMFIRE_POOL_FACTORY_HPP__

GemFire C++ Cache API Documentation