Pivotal GemFire Native Client Cache Reference  9.0.6
gemfire::RegionService Class Referenceabstract

A RegionService provides access to existing regions that exist in a GemFire cache. More...

Inherits gemfire::SharedBase.

Inherited by gemfire::GemFireCache.

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 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 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

A RegionService provides access to existing regions that exist in a GemFire cache.

Regions can be obtained using getRegion and queried using getQueryService. The service should be closed to free up resources once it is no longer needed. Once it is closed any attempt to use it or any regions obtained from it will cause a CacheClosedException to be thrown.

Instances of the interface are created using one of the following methods:

Member Function Documentation

virtual void gemfire::RegionService::close ( )
pure virtual

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 gemfire::Cache.

virtual PdxInstanceFactoryPtr gemfire::RegionService::createPdxInstanceFactory ( const char *  className)
pure virtual

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 gemfire::Cache.

virtual QueryServicePtr gemfire::RegionService::getQueryService ( )
pure virtual

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

Returns
A smart pointer to the QueryService.

Implemented in gemfire::Cache.

virtual RegionPtr gemfire::RegionService::getRegion ( const char *  name)
pure virtual

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 gemfire::Cache.

virtual bool gemfire::RegionService::isClosed ( ) const
pure virtual

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 gemfire::Cache.

void gemfire::SharedBase::preserveSB ( ) const
inherited

Atomically increment reference count.

int32_t gemfire::SharedBase::refCount ( )
inlineinherited
Returns
the reference count
void gemfire::SharedBase::releaseSB ( ) const
inherited

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

virtual void gemfire::RegionService::rootRegions ( VectorOfRegion regions)
pure virtual

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 gemfire::Cache.


GemFire C++ Cache API Documentation