VMware GemFire Native Client C++ API Reference
|
VMware VMware GemFire Native C++ Reference 10.4.3
|
A RegionService provides access to existing regions that exist in a Geode cache.
More...
#include <RegionService.hpp>
Inherited by apache::geode::client::AuthenticatedView, and apache::geode::client::GeodeCache.
Public Member Functions | |
| virtual void | close ()=0 |
| Terminates this object cache and releases all the local resources. | |
| virtual PdxInstanceFactory | createPdxInstanceFactory (const std::string &className) const =0 |
Returns a factory that can create a PdxInstance. | |
| virtual PdxInstanceFactory | createPdxInstanceFactory (const std::string &className, bool expectDomainClass) const =0 |
Returns a factory that can create a PdxInstance. | |
| virtual std::shared_ptr< QueryService > | getQueryService ()=0 |
| Gets the QueryService from which a new Query can be obtained. | |
| virtual std::shared_ptr< Region > | getRegion (const std::string &name) const =0 |
| Look up a region with the name. | |
| virtual bool | isClosed () const =0 |
| Indicates if this cache has been closed. | |
| virtual std::vector< std::shared_ptr< Region > > | rootRegions () const =0 |
| Returns a set of root regions in the cache. | |
Detailed Description
A RegionService provides access to existing regions that exist in a Geode 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:
-
CacheFactory#create()creates a client instance ofCache. -
Cache#createAuthenticatedView(Properties)creates a client multiuser authenticated cache view.
Member Function Documentation
◆ 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
-
keepalive whether to keep a durable CQ kept alive for this user.
- Exceptions
-
CacheClosedException,if the cache is already closed.
Implemented in apache::geode::client::AuthenticatedView, and apache::geode::client::Cache.
◆ createPdxInstanceFactory() [1/2]
|
pure virtual |
Returns a factory that can create a PdxInstance.
- Parameters
-
className the fully qualified class name that the PdxInstance will become when it is fully deserialized.
- Returns
- the factory
Implemented in apache::geode::client::AuthenticatedView, and apache::geode::client::Cache.
◆ createPdxInstanceFactory() [2/2]
|
pure virtual |
Returns a factory that can create a PdxInstance.
- Parameters
-
className the fully qualified class name that the PdxInstance will become when it is fully deserialized. expectDomainClass Whether or not created PdxType represents a Java domain class.
- Exceptions
-
IllegalStateException if the className is nullptr or invalid.
- Returns
- the factory
Implemented in apache::geode::client::AuthenticatedView, and apache::geode::client::Cache.
◆ getQueryService()
|
pure virtual |
Gets the QueryService from which a new Query can be obtained.
- Returns
- A smart pointer to the QueryService.
Implemented in apache::geode::client::AuthenticatedView, and apache::geode::client::Cache.
◆ getRegion()
|
pure virtual |
Look up a region with the name.
- Parameters
-
name the region's name, such as root.
- Returns
- region, or nullptr if no such region exists.
Implemented in apache::geode::client::AuthenticatedView, and apache::geode::client::Cache.
◆ isClosed()
|
pure virtual |
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::AuthenticatedView, and apache::geode::client::Cache.
◆ rootRegions()
|
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.
Implemented in apache::geode::client::AuthenticatedView, and apache::geode::client::Cache.
Apache Geode C++ Cache API Documentation