Skip to content

Commit

Permalink
Add descriptions for list and kill query procedures
Browse files Browse the repository at this point in the history
  • Loading branch information
boggle authored and systay committed Sep 14, 2016
1 parent 31984bc commit 17ecadd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.neo4j.kernel.impl.api.KernelTransactions;
import org.neo4j.kernel.internal.GraphDatabaseAPI;
import org.neo4j.procedure.Context;
import org.neo4j.procedure.Description;
import org.neo4j.procedure.Name;
import org.neo4j.procedure.Procedure;
import org.neo4j.time.Clocks;
Expand Down Expand Up @@ -130,6 +131,7 @@ public Stream<ConnectionResult> terminateConnectionsForUser( @Name( "username" )
return terminateConnectionsForValidUser( username );
}

@Description( "List all queries currently executing at this instance that are visible to the user." )
@Procedure( name = "dbms.listQueries", mode = DBMS )
public Stream<QueryStatusResult> listQueries() throws InvalidArgumentsException, IOException
{
Expand All @@ -141,6 +143,7 @@ public Stream<QueryStatusResult> listQueries() throws InvalidArgumentsException,
.map( this::queryStatusResult );
}

@Description( "Kill all transactions executing the query with the given query id." )
@Procedure( name = "dbms.killQuery", mode = DBMS )
public Stream<QueryTerminationResult> killQuery( @Name( "id" ) String idText )
throws InvalidArgumentsException, IOException
Expand All @@ -155,6 +158,7 @@ public Stream<QueryTerminationResult> killQuery( @Name( "id" ) String idText )
.map(this::killQueryTransaction);
}

@Description( "Kill all transactions executing a query with any of the given query ids." )
@Procedure( name = "dbms.killQueries", mode = DBMS )
public Stream<QueryTerminationResult> killQueries( @Name( "ids" ) List<String> idTexts )
throws InvalidArgumentsException, IOException
Expand Down

0 comments on commit 17ecadd

Please sign in to comment.