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

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_CACHEATTRIBUTES_H__
00002 #define __GEMFIRE_CACHEATTRIBUTES_H__
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 
00015 #include "gfcpp_globals.hpp"
00016 #include "gf_types.hpp"
00017 
00018 namespace gemfire {
00019 
00035 class CacheAttributesFactory;
00036 
00037 _GF_PTR_DEF_(CacheAttributes, CacheAttributesPtr);
00038 
00039 class CPPCACHE_EXPORT CacheAttributes : public SharedBase {
00040 
00044  public:
00045 
00049   int getRedundancyLevel();
00050 
00054   char *getEndpoints();
00055    
00056   ~CacheAttributes();
00057 
00058   bool operator == ( const CacheAttributes& other ) const;
00059 
00060   bool operator != ( const CacheAttributes& other ) const;
00061 
00062  private:
00063 
00067   void setRedundancyLevel(int redundancyLevel);
00068 
00072   void setEndpoints(char *endpoints);
00073   //will be created by the factory
00074   
00075   CacheAttributes(const CacheAttributes& rhs);
00076   CacheAttributes();
00077 
00078   int32_t compareStringAttribute(char* attributeA, char* attributeB) const;
00079   void copyStringAttribute( char*& lhs, const char* rhs);
00080 
00081   int m_redundancyLevel;
00082   char* m_endpoints;
00083   bool m_cacheMode;
00084 
00085   friend class CacheAttributesFactory;
00086   friend class CacheImpl;
00087 
00088   const CacheAttributes& operator=( const CacheAttributes& );
00089 
00090 };
00091 
00092 } //namespace gemfire
00093 
00094 #endif //ifndef __GEMFIRE_CACHEATTRIBUTES_H__

GemFire C++ Cache API Documentation