Package com.tangosol.util.extractor
Interface IndexAwareExtractor<T,E>
- 
- All Superinterfaces:
 CanonicallyNamed,Function<T,E>,Remote.Function<T,E>,Remote.ToDoubleFunction<T>,Remote.ToIntFunction<T>,Remote.ToLongFunction<T>,Serializable,ToDoubleFunction<T>,ToIntFunction<T>,ToLongFunction<T>,ValueExtractor<T,E>
- All Known Implementing Classes:
 ConditionalExtractor,DeserializationAccelerator
public interface IndexAwareExtractor<T,E> extends ValueExtractor<T,E>
IndexAwareExtractor is an extension to theValueExtractorinterface that supports the creation and destruction of anindex. Instances of this interface are intended to be used with theQueryMap.addIndex(com.tangosol.util.ValueExtractor<? super T, ? extends E>, boolean, java.util.Comparator<? super E>)andQueryMap.removeIndex(com.tangosol.util.ValueExtractor<? super T, ? extends E>)API to support the creation of custom indexes.- Since:
 - Coherence 3.6
 - Author:
 - tb 2010.02.08
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MapIndexcreateIndex(boolean fOrdered, Comparator comparator, Map<ValueExtractor<T,E>,MapIndex> mapIndex, BackingMapContext ctx)Create an index and associate it with the corresponding extractor.MapIndexdestroyIndex(Map<ValueExtractor<T,E>,MapIndex> mapIndex)Destroy an existing index and remove it from the given map of indexes.default ValueExtractorgetExtractor(Map<ValueExtractor<T,E>,MapIndex> mapIndex, MapIndex index)Obtain the underlying ValueExtractor that was added to the index map during theindex creation.- 
Methods inherited from interface com.tangosol.util.function.Remote.Function
andThen, compose 
- 
Methods inherited from interface com.tangosol.util.ValueExtractor
andThen, apply, applyAsDouble, applyAsInt, applyAsLong, compose, equals, extract, fromKey, getCanonicalName, getTarget, hashCode 
 - 
 
 - 
 
- 
- 
Method Detail
- 
createIndex
MapIndex createIndex(boolean fOrdered, Comparator comparator, Map<ValueExtractor<T,E>,MapIndex> mapIndex, BackingMapContext ctx)
Create an index and associate it with the corresponding extractor. Important note: it is a responsibility of this method's implementations to place the necessary <ValueExtractor, MapIndex> entry into the given map of indexes.- Parameters:
 fOrdered- true iff the contents of the indexed information should be ordered; false otherwisecomparator- the Comparator object which imposes an ordering of entries in the index contents; or null if the entries' values natural ordering should be usedmapIndex- Map<ValueExtractor, MapIndex> to be updated with the created indexctx- Thecontextthe index is associate with.- Returns:
 - the created index; null if the index has not been created
 
 
- 
destroyIndex
MapIndex destroyIndex(Map<ValueExtractor<T,E>,MapIndex> mapIndex)
Destroy an existing index and remove it from the given map of indexes.- Parameters:
 mapIndex- map<ValueExtractor, MapIndex> to be updated by removing the index being destroyed- Returns:
 - the destroyed index; null if the index does not exist
 
 
- 
getExtractor
default ValueExtractor getExtractor(Map<ValueExtractor<T,E>,MapIndex> mapIndex, MapIndex index)
Obtain the underlying ValueExtractor that was added to the index map during theindex creation.- Parameters:
 mapIndex- Map<ValueExtractor, MapIndex> containing the indexcreated by this extractorindex- the indexcreated by this extractor- Returns:
 - the corresponding ValueExtractor
 - Since:
 - Coherence 12.2.1.1
 
 
 - 
 
 -