Interface ExtractorBuilder
-
- All Known Implementing Classes:
ChainedExtractorBuilder
,ReflectionExtractorBuilder
,UniversalExtractorBuilder
public interface ExtractorBuilder
ExtractorBuilders provide a mechanism to construct aValueExtractor
for a provided cache name, target and property chain (realize(String, int, String)
).To determine the appropriate ValueExtractor implementations may need to decipher cache type information, which should be discernible from the provided cache name and
nTarget
(KEY
orVALUE
). The property chain(sProperties)
represents a chain of calls from the root type (key or value) down the type hierarchy.Implementations may be able to optimize the ValueExtractors used by CohQL by providing a mapping of a logical property name to a ValueExtractor that can optimally (without deserializing the entire key or value) extract the relevant property. For example, an implementation able to map properties to POF indices could convert a property chain to a POF path. Assuming a Person object is the value stored in a cache the table below illustrates possible implementations:
Implementation Examples Property Chain Unoptimized Optimized value().address.homeTel.areaCode
ChainedExtractor(ReflectionExtractor(getAddress), ReflectionExtractor(getHomeTel), ReflectionExtractor(getAreaCode))
PofExtractor(PofNavigator(2, 5, 7))
- Since:
- Coherence 12.2.1
- Author:
- jk 2014.07.10
- See Also:
ValueExtractor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ValueExtractor
realize(String sCacheName, int nTarget, String sProperties)
Create aValueExtractor
for the given cache name, target and property chain.
-
-
-
Method Detail
-
realize
ValueExtractor realize(String sCacheName, int nTarget, String sProperties)
Create aValueExtractor
for the given cache name, target and property chain.- Parameters:
sCacheName
- the name of the cache the ValueExtractor will be invoked againstnTarget
- the target for the ValueExtractorsProperties
- the path to the property value to extract- Returns:
- a
ValueExtractor
for the given cache name, target and properties
-
-