Caches are obtained from Create methods on the CacheFactory.Create class.
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 | |
| virtual void | Close (bool keepalive) |
| virtual void | Close () |
| IRegionService^ | CreateAuthenticatedView (Properties^ credentials, String^ poolName) |
| IRegionService^ | CreateAuthenticatedView (Properties^ credentials) |
| virtual Region^ | CreateRegion (String^ name, RegionAttributes^ attributes) |
| RegionFactory^ | CreateRegionFactory (RegionShortcut regionShortcut) |
| QueryService^ | GetQueryService (String^ poolName) |
| virtual QueryService^ | GetQueryService () |
| virtual Region^ | GetRegion (String^ path) |
| virtual void | InitializeDeclarativeCache (String^ cacheXml) |
| virtual void | ReadyForEvents () |
| virtual array< Region^ >^ | RootRegions () |
Properties | |
| virtual DistributedSystem^ | DistributedSystem [get] |
| virtual bool | IsClosed [get] |
| virtual String^ | Name [get] |
| virtual void GemStone::GemFire::Cache::Cache::Close | ( | bool | keepalive | ) | [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.
| keepalive | whether to keep a durable client's queue alive |
| CacheClosedException | if the cache is already closed. |
| virtual void GemStone::GemFire::Cache::Cache::Close | ( | ) | [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.
| CacheClosedException | if the cache is already closed. |
Implements GemStone::GemFire::Cache::IRegionService.
| IRegionService ^ GemStone::GemFire::Cache::Cache::CreateAuthenticatedView | ( | Properties^ | credentials, | |
| String^ | poolName | |||
| ) |
Returns the instance of IRegionService to do the operation on Cache with different Credential.
Deafault pool should be in multiuser mode CacheFactory.SetMultiuserAuthentication
| credentials | the user Credentials. | |
| poolName | Pool, which is in multiuser mode. |
| IRegionService ^ GemStone::GemFire::Cache::Cache::CreateAuthenticatedView | ( | Properties^ | credentials | ) |
Returns the instance of IRegionService to do the operation on Cache with different Credential.
Deafault pool should be in multiuser mode CacheFactory.SetMultiuserAuthentication
| credentials | the user Credentials. |
| virtual Region ^ GemStone::GemFire::Cache::Cache::CreateRegion | ( | String^ | name, | |
| RegionAttributes^ | attributes | |||
| ) | [virtual] |
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.
If Pool attached with Region is in multiusersecure mode then don't use return instance of region as no credential are attached with this instance. Get instance of region from <see cref="Cache.CreateAuthenticatedView" to do the operation on Cache.
| 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 |
| RegionFactory ^ GemStone::GemFire::Cache::Cache::CreateRegionFactory | ( | RegionShortcut | regionShortcut | ) |
Returns the instance of RegionFactory to create the region
Pass the RegionShortcut to set the deafult region attributes
| regionShortcut | the regionShortcut to set the default region attributes |
| QueryService ^ GemStone::GemFire::Cache::Cache::GetQueryService | ( | String^ | poolName | ) |
| virtual QueryService ^ GemStone::GemFire::Cache::Cache::GetQueryService | ( | ) | [virtual] |
Get a query service object to be able to query the cache. Supported only when cache is created from Pool(pool is in multiuserSecure mode)
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.
Implements GemStone::GemFire::Cache::IRegionService.
| virtual Region ^ GemStone::GemFire::Cache::Cache::GetRegion | ( | String^ | path | ) | [virtual] |
Returns an existing region given the full path from root, or null if no such region exists.
If Pool attached with Region is in multiusersecure mode then don't use return instance of region as no credential are attached with this instance. Get region from RegionService instance of Cache.Cache.CreateAuthenticatedView(PropertiesPtr).
| path | the pathname of the region |
Implements GemStone::GemFire::Cache::IRegionService.
| virtual void GemStone::GemFire::Cache::Cache::InitializeDeclarativeCache | ( | String^ | cacheXml | ) | [virtual] |
Initializes the cache from an XML file.
| cacheXml | pathname of a cache.xml file |
Implements GemStone::GemFire::Cache::IGemFireCache.
| virtual void GemStone::GemFire::Cache::Cache::ReadyForEvents | ( | ) | [virtual] |
Send the client-ready message to the server for a durable client.
This method should only be called for durable clients and with a cache server version 5.5 onwards.
| IllegalStateException | if there was a problem sending the message to the server. |
| virtual array<Region^> ^ GemStone::GemFire::Cache::Cache::RootRegions | ( | ) | [virtual] |
Returns an array of root regions in the cache. This set is a snapshot and is not backed by the cache.
It is not supported when Cache is created from Pool.
Implements GemStone::GemFire::Cache::IRegionService.
virtual 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.
Implements GemStone::GemFire::Cache::IGemFireCache.
virtual bool 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.
Implements GemStone::GemFire::Cache::IRegionService.
virtual String^ GemStone::GemFire::Cache::Cache::Name [get] |
Returns the name of this cache.
This method does not throw CacheClosedException if the cache is closed.
Implements GemStone::GemFire::Cache::IGemFireCache.