Creates a new cache using the specified system using parameters
from the given XML file and with
the given CacheAttributes.
Namespace: GemStone.GemFire.Cache
Assembly: GemStone.GemFire.Cache (in GemStone.GemFire.Cache.dll)
Version: 2.7.0.0
Syntax
| C# |
|---|
public static Cache Create( string name, DistributedSystem system, string cacheXml, CacheAttributes attributes ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function Create ( _ name As String, _ system As DistributedSystem, _ cacheXml As String, _ attributes As CacheAttributes _ ) As Cache |
| Visual C++ |
|---|
public: static Cache^ Create ( String^ name, DistributedSystem^ system, String^ cacheXml, CacheAttributes^ attributes ) |
Parameters
- name
- String
the name to associate with the new cache
- system
- DistributedSystem
a DistributedSystem obtained by calling Connect(String)
- cacheXml
- String
name of the cache configuration XML file
- attributes
- CacheAttributes
optional CacheAttributes for this cache; these override the ones provided in cacheXml.
Return Value
a Cache that uses the specified DistributedSystem for distribution.
Exceptions
| Exception | Condition |
|---|---|
| GemStone.GemFire.Cache..::IllegalArgumentException | If system is not IsConnected or name is null |
| GemStone.GemFire.Cache..::CacheExistsException | ff an open cache already exists |
| GemStone.GemFire.Cache..::CacheXmlException | if something went wrong while parsing the XML |
| GemStone.GemFire.Cache..::IllegalStateException | if the XML file is well-formed but not valid (consistent) |
See Also
CacheFactory Class
GemStone.GemFire.Cache Namespace