Interface IndexAwareExtractor<T,​E>

    • 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 otherwise
        comparator - the Comparator object which imposes an ordering of entries in the index contents; or null if the entries' values natural ordering should be used
        mapIndex - Map<ValueExtractor, MapIndex> to be updated with the created index
        ctx - The context the 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