Destroys the entry with the specified key, passing the callback
argument to any cache writers that are invoked in the operation.
Namespace: GemStone.GemFire.Cache
Assembly: GemStone.GemFire.Cache (in GemStone.GemFire.Cache.dll)
Version: 2.5.0.1
Syntax
| C# |
|---|
public void Destroy( CacheableKey key ) |
| Visual Basic (Declaration) |
|---|
Public Sub Destroy ( _ key As CacheableKey _ ) |
| Visual C++ |
|---|
public: void Destroy ( CacheableKey^ key ) |
Parameters
- key
- CacheableKey
the key of the entry to destroy
Remarks
Destroy removes not only the value, but also the key and entry from this region. @cacheserver Destroy will be distributed to other caches if the scope is not ScopeType.Local. @endcacheserver
@nativeclientThe destroy is propogated to the Gemfire cache server to which it is connected with.
@endnativeclientDoes not update any CacheStatistics.
Exceptions
| Exception | Condition |
|---|---|
| GemStone.GemFire.Cache..::IllegalArgumentException | if key is null |
| GemStone.GemFire.Cache..::CacheServerException | If an exception is received from the Java cache server. Only for Native Client regions. |
| GemStone.GemFire.Cache..::NotConnectedException | if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it. |
| GemStone.GemFire.Cache..::EntryNotFoundException | if the entry does not exist in this region locally |
| GemStone.GemFire.Cache..::TimeoutException | if the operation timed out |
| GemStone.GemFire.Cache..::RegionDestroyedException | if this region has been destroyed |