VMware GemFire Native C++ Reference  9.1
apache::geode::client::DistributedSystem Class Reference

DistributedSystem encapsulates this applications "connection" into the Geode Java servers distributed system. More...

Inherits apache::geode::client::SharedBase.

Public Member Functions

virtual const char * getName () const
 Returns the name that identifies the distributed system instance. More...
 
void preserveSB () const
 Atomically increment reference count. More...
 
int32_t refCount ()
 
void releaseSB () const
 Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. More...
 
virtual ~DistributedSystem ()
 destructor More...
 

Static Public Member Functions

static DistributedSystemPtr connect (const char *name, const PropertiesPtr &configPtr=::apache::geode::client::NullSharedBase::s_instancePtr)
 public methods More...
 
static void disconnect ()
 disconnect from the distributed system More...
 
static DistributedSystemPtr getInstance ()
 Returns a pointer to the DistributedSystem instance. More...
 
static SystemPropertiesgetSystemProperties ()
 Returns the SystemProperties that were used to create this instance of the DistributedSystem. More...
 
static bool isConnected ()
 Returns true if connected, false otherwise. More...
 

Protected Member Functions

 DistributedSystem (const char *name)
 constructors More...
 

Detailed Description

DistributedSystem encapsulates this applications "connection" into the Geode Java servers distributed system.

In order to participate in the Geode Java servers distributed system, each application needs to connect to the DistributedSystem. Each application can only be connected to one DistributedSystem.

Constructor & Destructor Documentation

virtual apache::geode::client::DistributedSystem::~DistributedSystem ( )
virtual

destructor

apache::geode::client::DistributedSystem::DistributedSystem ( const char *  name)
protected

constructors

Member Function Documentation

static DistributedSystemPtr apache::geode::client::DistributedSystem::connect ( const char *  name,
const PropertiesPtr configPtr = ::apache::geode::client::NullSharedBase::s_instancePtr 
)
static

public methods

Initializes the Native Client system to be able to connect to the Geode Java servers. If the name string is empty, then the default "NativeDS" is used as the name of distributed system.

Exceptions
LicenseExceptionif no valid license is found.
IllegalStateExceptionif GFCPP variable is not set and product installation directory cannot be determined
IllegalArgumentexception if DS name is NULL
AlreadyConnectedExceptionif this call has succeeded once before for this process
static void apache::geode::client::DistributedSystem::disconnect ( )
static

disconnect from the distributed system

Exceptions
IllegalStateExceptionif not connected
static DistributedSystemPtr apache::geode::client::DistributedSystem::getInstance ( )
static

Returns a pointer to the DistributedSystem instance.

Returns
instance
virtual const char* apache::geode::client::DistributedSystem::getName ( ) const
virtual

Returns the name that identifies the distributed system instance.

Returns
name
static SystemProperties* apache::geode::client::DistributedSystem::getSystemProperties ( )
static

Returns the SystemProperties that were used to create this instance of the DistributedSystem.

Returns
SystemProperties
static bool apache::geode::client::DistributedSystem::isConnected ( )
static

Returns true if connected, false otherwise.

Returns
true if connected, false otherwise
void apache::geode::client::SharedBase::preserveSB ( ) const
inherited

Atomically increment reference count.

int32_t apache::geode::client::SharedBase::refCount ( )
inlineinherited
Returns
the reference count
void apache::geode::client::SharedBase::releaseSB ( ) const
inherited

Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.


Pivotal GemFire C++ Cache API Documentation