public void close() { if (open.compareAndSet(true/* expect */, false/* update */)) { try { runningQuery.cancel(true/* mayInterruptIfRunning */); } finally { src.close(); } } }
public void close() { if (open.compareAndSet(true/* expect */, false/* update */)) { try { runningQuery.cancel(true/* mayInterruptIfRunning */); } finally { src.close(); } } }
public static boolean tryCancelUpdate(final QueryEngine queryEngine, final UUID queryId, final Future<Void> f) { final IRunningQuery q; try { q = queryEngine.getRunningQuery(queryId); if (q != null && q.cancel(true /* interrupt when running */)) { return true; } } catch (RuntimeException ex) { /* * Ignore. * * Either the IRunningQuery has already terminated or this is an * UPDATE rather than a QUERY. */ return false; } if (f != null) { if (f.cancel(true/* mayInterruptIfRunning */)) { return true; } } // Either not found or found but not running when cancelled. return false; }
public static boolean tryCancelUpdate(final QueryEngine queryEngine, final UUID queryId, final Future<Void> f) { final IRunningQuery q; try { q = queryEngine.getRunningQuery(queryId); if (q != null && q.cancel(true /* interrupt when running */)) { return true; } } catch (RuntimeException ex) { /* * Ignore. * * Either the IRunningQuery has already terminated or this is an * UPDATE rather than a QUERY. */ return false; } if (f != null) { if (f.cancel(true/* mayInterruptIfRunning */)) { return true; } } // Either not found or found but not running when cancelled. return false; }
/** * Attempt to cancel a running SPARQL Query * * @param queryEngine * @param queryId * @return */ public static boolean tryCancelQuery(final QueryEngine queryEngine, final UUID queryId) { final IRunningQuery q; try { q = queryEngine.getRunningQuery(queryId); } catch (RuntimeException ex) { /* * Ignore. * * Either the IRunningQuery has already terminated or this is an * UPDATE rather than a QUERY. */ return false; } if (q != null && q.cancel(true/* mayInterruptIfRunning */)) { if (log.isInfoEnabled()) log.info("Cancelled query: " + queryId); return true; } return false; }
/** * Attempt to cancel a running SPARQL Query * * @param queryEngine * @param queryId * @return */ public static boolean tryCancelQuery(final QueryEngine queryEngine, final UUID queryId) { final IRunningQuery q; try { q = queryEngine.getRunningQuery(queryId); } catch (RuntimeException ex) { /* * Ignore. * * Either the IRunningQuery has already terminated or this is an * UPDATE rather than a QUERY. */ return false; } if (q != null && q.cancel(true/* mayInterruptIfRunning */)) { if (log.isInfoEnabled()) log.info("Cancelled query: " + queryId); return true; } return false; }
public void close() { if (open) { open = false; runningQuery.cancel(true/* mayInterruptIfRunning */); src.close(); checkFuture(); } }
public void close() { if (open) { open = false; runningQuery.cancel(true/* mayInterruptIfRunning */); src.close(); checkFuture(); } }
childQuery.cancel(true/* mayInterruptIfRunning */); throw new RuntimeException("Query is done");
childQuery.cancel(true/* mayInterruptIfRunning */); throw new RuntimeException("Query is done");
if(q != null && q.cancel(true /* interrupt when running */)) { return true;
if(q != null && q.cancel(true /* interrupt when running */)) { return true;
runningQuery.cancel(true/* mayInterruptIfRunning */);
runningSubquery.cancel(true/* mayInterruptIfRunning */);
runningSubquery.cancel(true/* mayInterruptIfRunning */);
if (runningQuery != null) { runningQuery.cancel(true/* mayInterruptIfRunning */);