Class QueryCursor

  • All Implemented Interfaces:
    AutoCloseable, Iterable<QueryMatch>

    public class QueryCursor
    extends Object
    implements Iterable<QueryMatch>
    Cursor used for executing queries, carrying the state needed to process them.

    The query cursor should not be shared between threads, but can be reused for many query executions.

    Since:
    1.0.0
    Author:
    Ozren Dabić
    • Constructor Detail

      • QueryCursor

        public QueryCursor​(@NotNull
                           @NotNull Node node,
                           @NotNull
                           @NotNull Query query)
    • Method Detail

      • close

        public void close()
        Delete the query cursor, freeing all the memory that it used.
        Specified by:
        close in interface AutoCloseable
      • execute

        public void execute()
        Start running a given query on a given node. Successive calls to this method are ignored.
      • nextMatch

        public QueryMatch nextMatch()
        Advance to the next match of the currently running query.
        Returns:
        A match if there is one, null otherwise
        Throws:
        IllegalStateException - if queryExec() was not called beforehand
      • isNull

        public final boolean isNull()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object