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

GeodeCache represents the singleton cache that must be created in order to connect to Geode server. More...

Inherits apache::geode::client::RegionService.

Inherited by apache::geode::client::Cache.

Public Member Functions

virtual void close ()=0
 Terminates this object cache and releases all the local resources. More...
 
virtual PdxInstanceFactoryPtr createPdxInstanceFactory (const char *className)=0
 Returns a factory that can create a PdxInstance. More...
 
virtual DistributedSystemPtr getDistributedSystem () const =0
 Returns the distributed system that this cache was created with. More...
 
virtual const char * getName () const =0
 public methods More...
 
virtual bool getPdxIgnoreUnreadFields ()=0
 Returns whether Cache saves unread fields for Pdx types. More...
 
virtual bool getPdxReadSerialized ()=0
 Returns whether PdxInstance is preferred for PDX types instead of C++ object. More...
 
virtual QueryServicePtr getQueryService ()=0
 Gets the QueryService from which a new Query can be obtained. More...
 
virtual RegionPtr getRegion (const char *name)=0
 Look up a region with the name. More...
 
virtual void initializeDeclarativeCache (const char *cacheXml)=0
 Initializes the cache from an xml file. More...
 
virtual bool isClosed () const =0
 public methods 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 void rootRegions (VectorOfRegion &regions)=0
 Returns a set of root regions in the cache. More...
 

Detailed Description

GeodeCache represents the singleton cache that must be created in order to connect to Geode server.

Users must create a Cache. Instances of this interface are created using one of the following methods:

Member Function Documentation

virtual void apache::geode::client::RegionService::close ( )
pure virtualinherited

Terminates this object cache and releases all the local resources.

After this cache is closed, any further method call on this cache or any region object will throw CacheClosedException, unless otherwise noted. If RegionService is created from Cache#createAuthenticatedView", then it clears user related security data.

Parameters
keepalivewhether to keep a durable CQ kept alive for this user.
Exceptions
CacheClosedException,ifthe cache is already closed.

Implemented in apache::geode::client::Cache.

virtual PdxInstanceFactoryPtr apache::geode::client::RegionService::createPdxInstanceFactory ( const char *  className)
pure virtualinherited

Returns a factory that can create a PdxInstance.

Parameters
classNamethe fully qualified class name that the PdxInstance will become when it is fully deserialized.
Returns
the factory

Implemented in apache::geode::client::Cache.

virtual DistributedSystemPtr apache::geode::client::GeodeCache::getDistributedSystem ( ) const
pure virtual

Returns the distributed system that this cache was created with.

Implemented in apache::geode::client::Cache.

virtual const char* apache::geode::client::GeodeCache::getName ( ) const
pure virtual

public methods

Returns the name of this cache.

Returns
the string name of this cache

Implemented in apache::geode::client::Cache.

virtual bool apache::geode::client::GeodeCache::getPdxIgnoreUnreadFields ( )
pure virtual

Returns whether Cache saves unread fields for Pdx types.

Implemented in apache::geode::client::Cache.

virtual bool apache::geode::client::GeodeCache::getPdxReadSerialized ( )
pure virtual

Returns whether PdxInstance is preferred for PDX types instead of C++ object.

Implemented in apache::geode::client::Cache.

virtual QueryServicePtr apache::geode::client::RegionService::getQueryService ( )
pure virtualinherited

Gets the QueryService from which a new Query can be obtained.

Returns
A smart pointer to the QueryService.

Implemented in apache::geode::client::Cache.

virtual RegionPtr apache::geode::client::RegionService::getRegion ( const char *  name)
pure virtualinherited

Look up a region with the name.

Parameters
namethe region's name, such as root.
Returns
region, or NULLPTR if no such region exists.

Implemented in apache::geode::client::Cache.

virtual void apache::geode::client::GeodeCache::initializeDeclarativeCache ( const char *  cacheXml)
pure virtual

Initializes the cache from an xml file.

Parameters
cacheXmlValid cache.xml file

Implemented in apache::geode::client::Cache.

virtual bool apache::geode::client::RegionService::isClosed ( ) const
pure virtualinherited

public methods

Indicates if this cache has been closed. After a new cache object is created, this method returns false; After the close is called on this cache object, this method returns true.

Returns
true, if this cache is closed; false, otherwise

Implemented in apache::geode::client::Cache.

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.

virtual void apache::geode::client::RegionService::rootRegions ( VectorOfRegion regions)
pure virtualinherited

Returns a set of root regions in the cache.

This set is a snapshot and is not backed by the Cache. The vector passed in is cleared and the regions are added to it.

Parameters
regionsthe returned set of regions

Implemented in apache::geode::client::Cache.


Pivotal GemFire C++ Cache API Documentation