Oracle® Coherence .NET API Reference Release 3.7.1
E22844-03
Assembly: Coherence (in Coherence.dll) Version: 3.7.1.23 (3.7.1.23)
System..::.Object
Tangosol.Util.Extractor..::.AbstractExtractor
Tangosol.Util.Extractor..::.KeyExtractor
E22844-03
The KeyExtractor is a special purpose IValueExtractor
implementation that serves as an indicator that a query should be run
against the key objects rather than the values.
Namespace:
Tangosol.Util.ExtractorAssembly: Coherence (in Coherence.dll) Version: 3.7.1.23 (3.7.1.23)
Syntax
| C# |
|---|
public class KeyExtractor : AbstractExtractor, IPortableObject |
Remarks
The major difference between the KeyExtractor and a standard ReflectionExtractor is that when used in various IFilter implementations it forces the evaluation of entry keys rather than entry values.
For example, consider a key object that consists of two properties: "FirstName" and "LastName". To retrieve all keys that have a value of the "LastName" property equal to "Smith", the following query could be used:
IValueExtractor extractor = new KeyExtractor("LastName");
ICollection keys = cache.GetKeys(new EqualsFilter(extractor, "Smith"));
As of Coherence 3.5, the same effect can be achieved for subclasses
of the AbstractExtractor, for example:
IValueExtractor extractor = new ReflectionExtractor("LastName",
null,AbstractExtractor.KEY);
ICollection keys = cache.GetKeys(new EqualsFilter(extractor, "Smith"));
Inheritance Hierarchy
Tangosol.Util.Extractor..::.AbstractExtractor
Tangosol.Util.Extractor..::.KeyExtractor