H:/gfcppsancout/product/include/gfcpp/admin/AdministratedSystem.hpp

Go to the documentation of this file.
00001 #ifndef __GEMFIRE_ADMIN_ADMINISTRATEDSYSTEM_HPP__
00002 #define __GEMFIRE_ADMIN_ADMINISTRATEDSYSTEM_HPP__
00003 /*=========================================================================
00004  * (c) Copyright 2002-2007, GemStone Systems, Inc. All Rights Reserved.
00005  * 1260 NW Waterhouse Ave., Suite 200,  Beaverton, OR 97006
00006  * All Rights Reserved.  
00007  *
00008  * The specification of function behaviors is found in the corresponding .cpp file.
00009  *========================================================================
00010  */
00011 #include "../gfcpp_globals.hpp"
00012 #include "../SharedPtr.hpp"
00013 #include "../MembershipListener.hpp"
00014 #include "Locator.hpp"
00015 #include "CacheApplication.hpp"
00016 
00020 using namespace gemfire;
00021 
00022 namespace gemfire_admin {
00023 
00024 class CPPCACHE_EXPORT AdministratedSystemImpl;
00025 
00026 typedef SharedPtr< AdministratedSystemImpl > AdministratedSystemImplPtr;
00027 
00041 class CPPCACHE_EXPORT AdministratedSystem {
00042 
00043 public:
00068   static AdministratedSystem* connect( const char* system_name, const char* mcast_address, const char* mcast_port );
00069 
00074   static AdministratedSystem* connect( const char* system_name, const char* locator_address );
00075 
00082   static AdministratedSystem* connect( const char* system_name );
00083 
00088   static AdministratedSystem* getInstance();
00089 
00093   void disconnect();
00094 
00099   static bool isConnected();
00100 
00105   const char* getName();
00106 
00112   const bool getIsMulticast();
00113 
00117   const char* getMulticastAddress();
00118 
00122   uint32_t getMulticastPort();
00123   
00130   LocatorPtr getLocator();
00131 
00136   void discover();
00137 
00144   void getCacheApplications( VectorOfCacheApplication& apps );
00145 
00153   void addMembershipListener(const MembershipListener* listener);
00154 
00163   void removeMembershipListener(const MembershipListener* listener);
00164 
00165   virtual ~AdministratedSystem();
00166   static void libinit( );
00167 private:
00168   AdministratedSystem();
00169 
00170   static AdministratedSystem*       m_instance;
00171   static AdministratedSystemImplPtr* m_impl_ptr;
00172 
00173 friend class AdministratedSystemImpl;
00174 }; // AdministratedSystem class
00175 
00176 };//namespace gemfire_admin
00177 
00178 #endif //ifndef __GEMFIRE_ADMIN_ADMINISTRATEDSYSTEM_HPP__

GemFire C++ Cache API Documentation