H:/gfcppsancout/product/include/gfcpp/CacheAttributes.hpp

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_CACHEATTRIBUTES_H__
00002 #define __GEMFIRE_CACHEATTRIBUTES_H__
00003 /*=========================================================================
00004  * (c) Copyright 2002-2007, GemStone Systems, Inc. All Rights Reserved.
00005  * 1260 NW Waterhouse Ave., Suite 200,  Beaverton, OR 97006
00006  *========================================================================
00007  */
00008 
00013 #include "gfcpp_globals.hpp"
00014 #include "gf_types.hpp"
00015 
00016 namespace gemfire {
00017 
00033 class CacheAttributesFactory;
00034 
00035 _GF_PTR_DEF_(CacheAttributes, CacheAttributesPtr);
00036 
00037 class CPPCACHE_EXPORT CacheAttributes : public SharedBase {
00038 
00042  public:
00043 
00047   int getRedundancyLevel();
00048 
00052   char *getEndpoints();
00053    
00054   ~CacheAttributes();
00055 
00056   bool operator == ( const CacheAttributes& other ) const;
00057 
00058   bool operator != ( const CacheAttributes& other ) const;
00059 
00060  private:
00061 
00065   void setRedundancyLevel(int redundancyLevel);
00066 
00070   void setEndpoints(char *endpoints);
00071   //will be created by the factory
00072   
00073   CacheAttributes(const CacheAttributes& rhs);
00074   CacheAttributes();
00075 
00076   int32_t compareStringAttribute(char* attributeA, char* attributeB) const;
00077   void copyStringAttribute( char*& lhs, const char* rhs);
00078 
00079   int m_redundancyLevel;
00080   char* m_endpoints;
00081 
00082   friend class CacheAttributesFactory;
00083 
00084 };
00085 
00086 } //namespace gemfire
00087 
00088 #endif //ifndef __GEMFIRE_CACHEATTRIBUTES_H__

GemFire C++ Cache API Documentation