gemfire_admin::AdministratedSystem Class Reference


Detailed Description

class for Admnistering and Monitoring a GemFire Distributed System primary class of the Admin API, this class presents the facility to administer a GemFire Distributed System.

Provides access to the Distributed System's configuration and to other members of the Distributed System - namely CacheApplications, Cache Servers, and Locators.

Author:
Jim Nist

Public Member Functions

void addMembershipListener (const MembershipListener *listener)
 Registers a listener that receives callbacks when a member joins or leaves the Distributed System.
void disconnect ()
 Disconnects from the Administrated Distributed System.
void discover ()
 Refreshes the internal membership list of CacheApplications administered by this DistributedSystem.
void getCacheApplications (VectorOfCacheApplication &apps)
 Fills a vector of CacheApplications administered by this AdministratedSystem with the currently discovered Cache Applications.
const bool getIsMulticast ()
 Gets whether system is using Multicast.
LocatorPtr getLocator ()
 Return a pointer the single Locator administered by this DistributedSystem.
const char * getMulticastAddress ()
 Returns the multicast address for the Distributed System.
uint32_t getMulticastPort ()
 Returns the multicast port for the Distributed System.
const char * getName ()
 Returns a friendly Name for the Distributed System that this AdministrativeSystem represents.
void removeMembershipListener (const MembershipListener *listener)
 Unregisters a membership listener.

Static Public Member Functions

static
AdministratedSystem
connect (const char *system_name)
 Connects to the Administrated Distributed System based on configuration hierarchy that is part of the Gemfire Enterprise C++ transport configuration scheme.
static
AdministratedSystem
connect (const char *system_name, const char *locator_address)
 Connects to the Administrated Distributed System for Locator based systems.
static
AdministratedSystem
connect (const char *system_name, const char *mcast_address, const char *mcast_port)
 Connects to the Administrated Distributed System based on passed in connection parameters.
static
AdministratedSystem
getInstance ()
 Returns a pointer to the AdministeredSystem instance.
static bool isConnected ()
 tells whether this Distributed System Administrator is connected to it's Distributed System

Member Function Documentation

void gemfire_admin::AdministratedSystem::addMembershipListener ( const MembershipListener listener  ) 

Registers a listener that receives callbacks when a member joins or leaves the Distributed System.

Parameters:
listener pointer to a MembershipListener class

static AdministratedSystem* gemfire_admin::AdministratedSystem::connect ( const char *  system_name  )  [static]

Connects to the Administrated Distributed System based on configuration hierarchy that is part of the Gemfire Enterprise C++ transport configuration scheme.

static AdministratedSystem* gemfire_admin::AdministratedSystem::connect ( const char *  system_name,
const char *  locator_address 
) [static]

Connects to the Administrated Distributed System for Locator based systems.

static AdministratedSystem* gemfire_admin::AdministratedSystem::connect ( const char *  system_name,
const char *  mcast_address,
const char *  mcast_port 
) [static]

Connects to the Administrated Distributed System based on passed in connection parameters.

This method will return immediately after spawning a background thread that connects to the Distributed System. Connecting means the AdministratedSystem is looking for Admininstration and Membership message activity on it it's configured transport protocol.

any modification to the configuration of the Distributed System should be done BEFORE either of the connect methods are called. the connect methods use the current SystemConfig for transport protocol information.

aDistributedSystem can be "connected" before any members of the system have been started or discovered.

See also:
isConnected Connects to the Administrated Distributed System for MultiCast based systems

void gemfire_admin::AdministratedSystem::disconnect (  ) 

Disconnects from the Administrated Distributed System.

void gemfire_admin::AdministratedSystem::discover (  ) 

Refreshes the internal membership list of CacheApplications administered by this DistributedSystem.

void gemfire_admin::AdministratedSystem::getCacheApplications ( VectorOfCacheApplication apps  ) 

Fills a vector of CacheApplications administered by this AdministratedSystem with the currently discovered Cache Applications.

To ensure currency, call discover() first.

static AdministratedSystem* gemfire_admin::AdministratedSystem::getInstance (  )  [static]

Returns a pointer to the AdministeredSystem instance.

Returns:
instance

const bool gemfire_admin::AdministratedSystem::getIsMulticast (  ) 

Gets whether system is using Multicast.

not using Multicast implies that the Locator service is being used

LocatorPtr gemfire_admin::AdministratedSystem::getLocator (  ) 

Return a pointer the single Locator administered by this DistributedSystem.

Returns:
Return a pointer to the single Locator

const char* gemfire_admin::AdministratedSystem::getMulticastAddress (  ) 

Returns the multicast address for the Distributed System.

uint32_t gemfire_admin::AdministratedSystem::getMulticastPort (  ) 

Returns the multicast port for the Distributed System.

const char* gemfire_admin::AdministratedSystem::getName (  ) 

Returns a friendly Name for the Distributed System that this AdministrativeSystem represents.

static bool gemfire_admin::AdministratedSystem::isConnected (  )  [static]

tells whether this Distributed System Administrator is connected to it's Distributed System

void gemfire_admin::AdministratedSystem::removeMembershipListener ( const MembershipListener listener  ) 

Unregisters a membership listener.

Parameters:
listener pointer to a MembershipListener class
See also:
addMembershipListener


GemFire C++ Cache API Documentation