Oracle® Fusion Middleware .NET API Reference for Oracle Coherence
12c (12.2.1.4.0)
E90869-02
12c (12.2.1.4.0)
E90869-02
ConditionalRemove is an IEntryProcessor that
performs an Remove(Boolean)
operation if the specified condition is satisfied.
Namespace: Tangosol.Util.Processor
Assembly: Coherence (in Coherence.dll) Version: 12.2.1.4014 (12.2.1.4014)
Syntax
C# |
---|
public class ConditionalRemove : AbstractProcessor, IPortableObject |
Remarks
While the ConditionalRemove processing could be implemented via direct key-based IQueryCache operations, it is more efficient and enforces concurrency control without explicit locking.
For example, the following operations are functionally similar, but the IInvocableDictionary versions (a) perform significantly better for partitioned caches; (b) provide all necessary concurrency control (which is ommited from the IQueryCache examples):
IInvocableCache | IQueryCache |
---|---|
cache.invoke(key, new ConditionalRemove(filter)); | if (filter.Evaluate(cache[key]) cache.Remove(key); |
cache.InvokeAll(colKeys, new ConditionalRemove(filter)); | foreach (object key in colKeys) if (filter.Evaluate(cache.[key]) cache.Remove(key); |
cache.InvokeAll(filter1, new ConditionalRemove(filter2); | foreach (object key in cache.GetKeys(filter1)) if (filter2.Evaluate(cache[key]) cache.Remove(key); |
cache.InvokeAll(filter, new ConditionalRemove(AlwaysFilter.INSTANCE)); | ICollection colKeys = cache.GetKeys(filter); cache.Keys.RemoveAll(colKeys); |
Inheritance Hierarchy
System..::..Object
Tangosol.Util.Processor..::..AbstractProcessor
Tangosol.Util.Processor..::..ConditionalRemove
Tangosol.Util.Processor..::..AbstractProcessor
Tangosol.Util.Processor..::..ConditionalRemove