Class OffHeapIndex<A extends Comparable<A>,​O,​K extends Comparable<K>>

    • Method Detail

      • retrieve

        public ResultSet<O> retrieve​(Query<O> query,
                                     QueryOptions queryOptions)
        Description copied from interface: Index
        Returns a ResultSet which when iterated will return objects from the index matching the query supplied.

        Usually ResultSets are lazy which means that they don't actually do any work, or encapsulate or materialize matching objects, but rather they encapsulate logic to fetch matching objects from the index on-the-fly as the application iterates through the ResultSet.

        Specified by:
        retrieve in interface Index<A extends Comparable<A>>
        Overrides:
        retrieve in class SimplifiedSQLiteIndex<A extends Comparable<A>,​O,​K extends Comparable<K>>
        Parameters:
        query - An object which specifies some restriction on an attribute of an object
        queryOptions - Optional parameters for the query
        Returns:
        A set of objects with attributes matching the restriction imposed by the query
        See Also:
        Index.supportsQuery(Query, QueryOptions)
      • onAttribute

        public static <A extends Comparable<A>,​O> OffHeapIndex<A,​O,​? extends Comparable<?>> onAttribute​(Attribute<O,​A> attribute)
        Creates a new OffHeapIndex.
        Type Parameters:
        A - The type of the attribute to be indexed.
        O - The type of the object containing the attribute.
        Parameters:
        attribute - The Attribute on which the index will be built.
        Returns:
        An OffHeapIndex on the given attribute.