Caches are obtained from static methods on the CacheFactory class.
When a cache is created a DistributedSystem must be specified.
When a cache will no longer be used, call Cache.Close. Once it Cache.IsClosed 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 () |
| Region^ | CreateRegion (String^ name, RegionAttributes^ attributes) |
| void | CreateServerRegion (String^ name, RegionAttributes^ attributes) |
| This functionality is unsupported in the Native Client Product. | |
| void | DeregisterRegionListener () |
| void | DestroyServerRegion (String^ name) |
| This functionality is unsupported in the Native Client Product. | |
| QueryService^ | GetQueryService () |
| Region^ | GetRegion (String^ path) |
| RegionAttributes^ | GetServerRegionAttributes (String^ path) |
| This functionality is unsupported in the Native Client Product. | |
| array< String^ >^ | GetServerRegions (String^ parent) |
| This functionality is unsupported in the Native Client Product. | |
| void | InitializeDeclarativeCache (String^ cacheXml) |
| void | RegisterRegionListener (ICacheRegionListener^ listener) |
| array< Region^ >^ | RootRegions () |
| array< String^ >^ | ServerRootRegions () |
| This functionality is unsupported in the Native Client Product. | |
Properties | |
| DistributedSystem^ | DistributedSystem [get] |
| Boolean | IsClosed [get] |
| String^ | Name [get] |
| void GemStone::GemFire::Cache::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. |
| Region ^ GemStone::GemFire::Cache::Cache::CreateRegion | ( | String^ | name, | |
| RegionAttributes^ | attributes | |||
| ) |
Creates a region with the given name 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 | |
| attributes | the attributes of the root region |
| RegionExistsException | if a region with the same name 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 optional PersistenceManager fails to initialize | |
| UnknownException | otherwise |
| void GemStone::GemFire::Cache::Cache::CreateServerRegion | ( | String^ | name, | |
| RegionAttributes^ | attributes | |||
| ) |
This functionality is unsupported in the Native Client Product.
| void GemStone::GemFire::Cache::Cache::DeregisterRegionListener | ( | ) |
Deregister the existing ICacheRegionListener.
| void GemStone::GemFire::Cache::Cache::DestroyServerRegion | ( | String^ | name | ) |
This functionality is unsupported in the Native Client Product.
| QueryService ^ GemStone::GemFire::Cache::Cache::GetQueryService | ( | ) |
Get a query service object to be able to query the cache.
Currently only works against the java server in native mode, and at least some endpoints must have been defined in some regions before actually firing a query.
| Region ^ GemStone::GemFire::Cache::Cache::GetRegion | ( | String^ | path | ) |
Returns an existing region given the full path from root, or null if no such region exists.
| path | the pathname of the region |
| RegionAttributes ^ GemStone::GemFire::Cache::Cache::GetServerRegionAttributes | ( | String^ | path | ) |
This functionality is unsupported in the Native Client Product.
| array<String^> ^ GemStone::GemFire::Cache::Cache::GetServerRegions | ( | String^ | parent | ) |
This functionality is unsupported in the Native Client Product.
| void GemStone::GemFire::Cache::Cache::InitializeDeclarativeCache | ( | String^ | cacheXml | ) |
Initializes the cache from an XML file.
| cacheXml | pathname of a cache.xml file |
| void GemStone::GemFire::Cache::Cache::RegisterRegionListener | ( | ICacheRegionListener^ | listener | ) |
Register an ICacheRegionListener.
Only one ICacheRegionListener can be registered at a time. If a new ICacheRegionListener is registered on an existing one then the new one replaces the old one.
| listener | The ICacheRegionListener to be registered. |
| array<Region^> ^ GemStone::GemFire::Cache::Cache::RootRegions | ( | ) |
Returns an array of root regions in the cache. This set is a snapshot and is not backed by the cache.
| array<String^> ^ GemStone::GemFire::Cache::Cache::ServerRootRegions | ( | ) |
This functionality is unsupported in the Native Client Product.
DistributedSystem^ GemStone::GemFire::Cache::Cache::DistributedSystem [get] |
Returns the distributed system used to CacheFactory.Create this cache.
This method does not throw CacheClosedException if the cache is closed.
Boolean GemStone::GemFire::Cache::Cache::IsClosed [get] |
True if this cache has been closed.
After a new cache object is created, this method returns false. After Close is called on this cache object, this method returns true.
String^ GemStone::GemFire::Cache::Cache::Name [get] |
Returns the name of this cache.
This method does not throw CacheClosedException if the cache is closed.