public interface IndexAwareExtractor<T,E> extends ValueExtractor<T,E>
ValueExtractor
interface
that supports the creation and destruction of an index
.
Instances of this interface are intended to be used with the
QueryMap.addIndex(com.tangosol.util.ValueExtractor<? super T, ? extends E>, boolean, java.util.Comparator<? super E>)
and
QueryMap.removeIndex(com.tangosol.util.ValueExtractor<? super T, ? extends E>)
API to support the creation
of custom indexes.Modifier and Type | Method and Description |
---|---|
MapIndex |
createIndex(boolean fOrdered,
Comparator comparator,
Map<ValueExtractor<T,E>,MapIndex> mapIndex,
BackingMapContext ctx)
Create an index and associate it with the corresponding extractor.
|
MapIndex |
destroyIndex(Map<ValueExtractor<T,E>,MapIndex> mapIndex)
Destroy an existing index and remove it from the given map of indexes.
|
default ValueExtractor |
getExtractor(Map<ValueExtractor<T,E>,MapIndex> mapIndex,
MapIndex index)
Obtain the underlying ValueExtractor that was added to the index map
during the
index creation . |
andThen, apply, applyAsDouble, applyAsInt, applyAsLong, compose, equals, extract, fromKey, getCanonicalName, getTarget, hashCode, identity, identityCast, of
andThen, compose
MapIndex createIndex(boolean fOrdered, Comparator comparator, Map<ValueExtractor<T,E>,MapIndex> mapIndex, BackingMapContext ctx)
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
- The context
the index is
associate with.MapIndex destroyIndex(Map<ValueExtractor<T,E>,MapIndex> mapIndex)
mapIndex
- map<ValueExtractor, MapIndex> to be updated by
removing the index being destroyeddefault ValueExtractor getExtractor(Map<ValueExtractor<T,E>,MapIndex> mapIndex, MapIndex index)
index creation
.mapIndex
- Map<ValueExtractor, MapIndex> containing the index
created by this extractor
index
- the index created by this extractor