Creates a new cache using the specified system using the given
CacheAttributes.
Namespace: GemStone.GemFire.Cache
Assembly: GemStone.GemFire.Cache (in GemStone.GemFire.Cache.dll)
Version: 2.5.0.1
Syntax
| C# |
|---|
public static Cache Create( string name, DistributedSystem system, CacheAttributes attributes ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function Create ( _ name As String, _ system As DistributedSystem, _ attributes As CacheAttributes _ ) As Cache |
| Visual C++ |
|---|
public: static Cache^ Create ( String^ name, DistributedSystem^ system, CacheAttributes^ attributes ) |
Parameters
- name
- String
the name to associate with the new cache
- system
- DistributedSystem
a DistributedSystem obtained by calling Connect(String)
- attributes
- CacheAttributes
@nativeclient optional CacheAttributes for this cache @endnativeclient @cacheserver optional CacheAttributes for this cache; this option is only for native clients. This parameter can take a non-null value only for native client caches. @endcacheserver
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 |
See Also
CacheFactory Class
GemStone.GemFire.Cache Namespace