When a cache is created a DistributedSystem must be specified.
When a cache will no longer be used, it should be closed. Once it is closed any attempt to use it will cause a CacheClosedException to be thrown.
A cache can have multiple root regions, each with a different name.
Public Member Functions | |
| void | close () |
| Terminates this object cache and releases all the local resources. | |
| RegionPtr | createRegion (const char *name, RegionAttributesPtr &aRegionAttributes) |
| Returns a region created using the specified RegionAttributes. | |
| void | createServerRegion (const char *name, RegionAttributesPtr &aRegionAttributes) |
| This functionality is unsupported in the Native Client Product. | |
| void | deregisterRegionListener (CacheRegionListenerPtr &listener) |
| Deregister a CacheRegionListener. | |
| void | destroyServerRegion (const char *name) |
| This functionality is unsupported in the Native Client Product. | |
| void | freeStringList (char **names, int cnt) |
| This functionality is unsupported in the Native Client Product. | |
| DistributedSystemPtr | getDistributedSystem () |
| Returns the distributed system that this cache was created with. | |
| const char * | getName () const |
| Returns the name of this cache. | |
| QueryServicePtr | getQueryService () |
| Gets the QueryService from which a new Query can be obtained. | |
| RegionPtr | getRegion (const char *path) |
| Look up a region with the full path from root. | |
| RegionAttributesPtr | getServerRegionAttributes (const char *path) |
| This functionality is unsupported in the Native Client Product. | |
| char ** | getServerRegions (const char *parent, int ®ionCnt) |
| This functionality is unsupported in the Native Client Product. | |
| void | initializeDeclarativeCache (const char *cacheXml) |
| bool | isClosed () const |
| Indicates if this cache has been closed. | |
| void | preserveSB () const |
| Atomically increment reference count. | |
| int32_t | refCount () |
| |
| void | registerRegionListener (CacheRegionListenerPtr &listener) |
| Register a CacheRegionListener. | |
| void | releaseSB () const |
| Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. | |
| void | rootRegions (VectorOfRegion ®ions) |
| Returns a set of root regions in the cache. | |
| char ** | serverRootRegions (int &rootRegionCnt) |
| This functionality is unsupported in the Native Client Product. | |
| void | setSearchTimeout (int seconds) |
| This functionality is unsupported in the Native Client Product. | |
| virtual | ~Cache () |
| virtual gemfire::Cache::~Cache | ( | ) | [virtual] |
destructor
| void gemfire::Cache::close | ( | ) |
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.
| CacheClosedException,if | the cache is already closed. |
| RegionPtr gemfire::Cache::createRegion | ( | const char * | name, | |
| RegionAttributesPtr & | aRegionAttributes | |||
| ) |
Returns a region created using the specified RegionAttributes.
The region is just created locally. It is not created on the server to which this client is connected with.
| name | the name of the region to create | |
| aRegionAttributes | the attributes of the root region |
| InvalidArgumentException | if the attributePtr is NULL. | |
| RegionExistsException | if a region is already in this cache | |
| CacheClosedException | if the cache is closed | |
| OutOfMemoryException | if the memory allocation failed | |
| RegionCreationFailedException | if the call fails due to incomplete mirror initialization | |
| InitFailedException | if the PersistenceManagerImpl object fails to initialize | |
| UnsupportedOperationException | if the region attributes are not consistent with cache attributes and distributed system properties. | |
| UnknownException | otherwise |
| void gemfire::Cache::createServerRegion | ( | const char * | name, | |
| RegionAttributesPtr & | aRegionAttributes | |||
| ) |
This functionality is unsupported in the Native Client Product.
| void gemfire::Cache::deregisterRegionListener | ( | CacheRegionListenerPtr & | listener | ) |
| void gemfire::Cache::destroyServerRegion | ( | const char * | name | ) |
This functionality is unsupported in the Native Client Product.
| void gemfire::Cache::freeStringList | ( | char ** | names, | |
| int | cnt | |||
| ) |
This functionality is unsupported in the Native Client Product.
| DistributedSystemPtr gemfire::Cache::getDistributedSystem | ( | ) |
Returns the distributed system that this cache was created with.
| const char* gemfire::Cache::getName | ( | ) | const |
Returns the name of this cache.
| QueryServicePtr gemfire::Cache::getQueryService | ( | ) |
Gets the QueryService from which a new Query can be obtained.
| RegionPtr gemfire::Cache::getRegion | ( | const char * | path | ) |
Look up a region with the full path from root.
| path | the region's path, such as RootA/Sub1/Sub1A. |
| RegionAttributesPtr gemfire::Cache::getServerRegionAttributes | ( | const char * | path | ) |
This functionality is unsupported in the Native Client Product.
| char** gemfire::Cache::getServerRegions | ( | const char * | parent, | |
| int & | regionCnt | |||
| ) |
This functionality is unsupported in the Native Client Product.
| void gemfire::Cache::initializeDeclarativeCache | ( | const char * | cacheXml | ) |
public methods Initializes the cache from an xml file
| bool gemfire::Cache::isClosed | ( | ) | const |
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.
| void gemfire::SharedBase::preserveSB | ( | ) | const [inherited] |
Atomically increment reference count.
| int32_t gemfire::SharedBase::refCount | ( | ) | [inline, inherited] |
| void gemfire::Cache::registerRegionListener | ( | CacheRegionListenerPtr & | listener | ) |
| void gemfire::SharedBase::releaseSB | ( | ) | const [inherited] |
Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.
| void gemfire::Cache::rootRegions | ( | VectorOfRegion & | regions | ) |
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.
| regions | the returned set of regions |
| char** gemfire::Cache::serverRootRegions | ( | int & | rootRegionCnt | ) |
This functionality is unsupported in the Native Client Product.
| void gemfire::Cache::setSearchTimeout | ( | int | seconds | ) |
This functionality is unsupported in the Native Client Product.