Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private QueryTerminationResult killQueryTransaction(org.neo4j.helpers.collection.Pair<org.neo4j.kernel.api.KernelTransactionHandle, org.neo4j.kernel.api.query.ExecutingQuery> pair) throws org.neo4j.kernel.api.exceptions.InvalidArgumentsException
        private QueryTerminationResult KillQueryTransaction(Pair <KernelTransactionHandle, ExecutingQuery> pair)
        {
            ExecutingQuery query = pair.Other();

            if (IsAdminOrSelf(query.Username()))
            {
                pair.First().markForTermination(Org.Neo4j.Kernel.Api.Exceptions.Status_Transaction.Terminated);
                return(new QueryTerminationResult(ofInternalId(query.InternalQueryId()), query.Username()));
            }
            else
            {
                throw new AuthorizationViolationException(PERMISSION_DENIED);
            }
        }
Esempio n. 2
0
 internal override ExecutingQueryList Push(ExecutingQuery newExecutingQuery)
 {
     Debug.Assert(newExecutingQuery.InternalQueryId() > Query.internalQueryId());
     WaitsFor(newExecutingQuery);
     return(new Entry(newExecutingQuery, this));
 }