Pivotal GemFire Native Client Cache Reference  9.0.6
AttributesFactory.hpp
Go to the documentation of this file.
1 #ifndef __GEMFIRE_ATTRIBUTESFACTORY_H__
2 #define __GEMFIRE_ATTRIBUTESFACTORY_H__
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 "gf_types.hpp"
13 #include "ExceptionTypes.hpp"
14 #include "ExpirationAction.hpp"
15 #include "CacheLoader.hpp"
16 #include "CacheWriter.hpp"
17 #include "CacheListener.hpp"
18 #include "PartitionResolver.hpp"
19 #include "RegionAttributes.hpp"
20 #include "ScopeType.hpp"
21 #include "DiskPolicyType.hpp"
22 #include "Pool.hpp"
23 
28 namespace gemfire {
29 
140 
144  public:
153 
159  AttributesFactory(const RegionAttributesPtr& regionAttributes);
160 
164  virtual ~AttributesFactory();
165 
166  // CALLBACKS
167 
171  void setCacheLoader(const CacheLoaderPtr& cacheLoader);
172 
176  void setCacheWriter(const CacheWriterPtr& cacheWriter);
177 
181  void setCacheListener(const CacheListenerPtr& aListener);
182 
186  void setPartitionResolver(const PartitionResolverPtr& aResolver);
187 
188 
192  void setCacheLoader(const char* libpath, const char* factoryFuncName);
193 
198  void setCacheWriter(const char* libpath, const char* factoryFuncName);
199 
203  void setCacheListener(const char* libpath, const char* factoryFuncName);
204 
208  void setPartitionResolver(const char* libpath, const char* factoryFuncName);
209 
210 
211 
212  // EXPIRATION ATTRIBUTES
213 
219  void setEntryIdleTimeout(ExpirationAction::Action action, int32_t idleTimeout);
220 
226  void setEntryTimeToLive(ExpirationAction::Action action, int32_t timeToLive);
227 
228 
234  void setRegionIdleTimeout(ExpirationAction::Action action, int32_t idleTimeout);
235 
241  void setRegionTimeToLive(ExpirationAction::Action action, int32_t timeToLive);
242 
243 
244  // PERSISTENCE
250  void setPersistenceManager(const char* libpath, const char* factoryFuncName,
251  const PropertiesPtr& config = NULLPTR);
252 
256  void setPersistenceManager(const PersistenceManagerPtr& persistenceManager,
257  const PropertiesPtr& config = NULLPTR);
258 
259 
260  public:
261 
262  // DISTRIBUTION ATTRIBUTES
263 
269  void setScope(const ScopeType::Scope scopeType);
270 
276  void setClientNotificationEnabled( bool clientNotificationEnabled);
277 
278 
279  // MAP ATTRIBUTES
286  void setInitialCapacity( int initialCapacity);
287 
294  void setLoadFactor( float loadFactor);
295 
301  void setConcurrencyLevel(uint8_t concurrencyLevel);
302 
309  void setLruEntriesLimit( const uint32_t entriesLimit );
310 
315  void setDiskPolicy(const DiskPolicyType::PolicyType diskPolicy);
316 
325  void setCachingEnabled( bool cachingEnabled );
326 
335  void setEndpoints( const char * endpoints );
336 
352  void setPoolName( const char * name );
353 
359  void setCloningEnabled( bool isClonable );
360 
366  void setConcurrencyChecksEnabled( bool concurrencyChecksEnabled );
367 
368  // FACTORY METHOD
369 
375  RegionAttributesPtr createRegionAttributes();
376 
377 
378 private:
379  RegionAttributes m_regionAttributes;
380  bool m_useDefaultClientNotification;
381  static void validateAttributes(RegionAttributes& attrs) ;
382 };
383 } //namespace gemfire
384 #endif //ifndef __GEMFIRE_ATTRIBUTESFACTORY_H__
Action
Definition: ExpirationAction.hpp:29
Creates instances of RegionAttributes.
Definition: AttributesFactory.hpp:139
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
Defines attributes for configuring a region.
Definition: RegionAttributes.hpp:59
#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
PolicyType
Values for setting PolicyType.
Definition: DiskPolicyType.hpp:29
Scope
Values for setting Scope.
Definition: ScopeType.hpp:35
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:35

GemFire C++ Cache API Documentation