Interface IndexedQuery<E>

  • All Known Implementing Classes:

    public interface IndexedQuery<E>
    A query that uses indexing.
    • Method Detail

      • list

        default List<E> list()
        the results of a search as a list.
      • firstResult

        IndexedQuery<E> firstResult​(int index)
        Sets the index of the first result, skipping the previous ones. Used for pagination.
        index - of the first result
        IllegalArgumentException - if the index given is less than zero.
      • maxResults

        IndexedQuery<E> maxResults​(int maxResults)
        Sets the maximum number of results to return from the query. Used for pagination.
        maxResults - the maximum number of results to return.
      • entryIterator

        <K> CloseableIterator<Map.Entry<K,​E>> entryIterator()
        Returns the matching entries (both key and value).

        NOTE: The query must not contain any projections or an exception will be thrown.

      • execute

        QueryResult<?> execute()
        Executes an Ickle statement returning results (query aka. SELECT). If the statement happens to be a DELETE it redirects it to executeStatement().

        NOTE: Paging params (firstResult/maxResults) are honoured for SELECT and dissalowed for DELETE.

      • executeStatement

        int executeStatement()
        Executes an Ickle statement not returning any results (ie. DELETE).

        NOTE: Paging params (firstResult/maxResults) are NOT allowed.

        the number of affected entries
      • getResultSize

        int getResultSize()
      • timeout

        IndexedQuery<E> timeout​(long timeout,
                                TimeUnit timeUnit)
        Set the timeout for this query. If the query hasn't finished processing before the timeout, an exception will be thrown.
        timeout - the timeout duration
        timeUnit - the time unit of the timeout parameter