Removing an Entry
Region.Remove function removes the entry with specified key and provides a user-defined parameter object to any
CacheListener invoked in the process.
Remove call not only removes the value, but also the key and entry from this region. The remove operation is propagated to the server that the client is connected to. If the destroy operation fails due to an exception on the server (for example, a
CacheServerException or security exception), then the local entry is still removed.
Remove operation updates
CacheStatistics.MissCount for this region and the entry.
Remove API returns true if the entry (key, value) has been removed or false if the entry (key, value) has not been removed.
Bulk Remove Operations Using RemoveAll
You can use the
Region.RemoveAll API to remove all entries for a collection of specified keys from the region. The effect of this call is equivalent to that of calling
Remove on this region once for each key in the specified collection. If an entry does not exist, then that key is skipped. Note that an
EntryNotFoundException is not thrown.
RemoveAll operation updates
CacheStatistics.MissCount for this region and the entries that are removed.
RemoveAll API also supports providing a callback argument to any cache loaders or cache writers that are invoked in the operation.