Interface QueryManager


public interface QueryManager
Provides basic query management functions such as listing all the running queries and killing a running query on-demand.
Author:
Evren Sirin
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant to indicate that the query has no client-specified ID, the server will auto-assign.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a list of all the running queries.
    Returns info for a running query with the given ID.
    default QueryInfo
    getQuery(String theID, boolean verbose)
     
    boolean
    Kills the running query identified by the given ID.
  • Field Details

    • NO_ID

      static final String NO_ID
      Constant to indicate that the query has no client-specified ID, the server will auto-assign.
      See Also:
  • Method Details

    • getAllQueries

      Collection<QueryInfo> getAllQueries() throws StardogException
      Returns a list of all the running queries. Users with [READ "admin:<db>"] permission grant are allowed to see all running queries on a database, but regular users can only see the queries which they started. The result will be empty (not null) if there are no running queries.
      Throws:
      StardogException
    • getQuery

      QueryInfo getQuery(String theID) throws StardogException
      Returns info for a running query with the given ID. Users with [READ "admin:<db>"] permission grant are allowed to see all running queries on a database, but regular users can only see the queries which they started.
      Throws:
      StardogException - if the authenticated user does not have permission to see the query, or an error occurred trying to get the query
    • getQuery

      default QueryInfo getQuery(String theID, boolean verbose) throws StardogException
      Throws:
      StardogException
    • killQuery

      boolean killQuery(String theID) throws StardogException
      Kills the running query identified by the given ID. Users with both [READ "admin:<db>"] and [EXECUTE "admin:<db>"] permission grants may kill any running query, but regular users can only kill queries which they started. Idempotent operation, killing a query again or if the query does not exist will not throw an exception.
      Returns:
      true if a query was killed, false if there was none with that ID.
      Throws:
      StardogException - if the authenticated user does not have permission to kill the query, or an error occurred trying to kill the query