本文整理了Java中org.openrdf.query.QueryInterruptedException
类的一些代码示例,展示了QueryInterruptedException
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryInterruptedException
类的具体详情如下:
包路径:org.openrdf.query.QueryInterruptedException
类名称:QueryInterruptedException
[英]An exception indicating that the evaluation of a query has been interrupted, for example because it took too long to complete.
[中]一种异常,指示查询的计算已被中断,例如,因为它花费了太长时间才完成。
代码示例来源:origin: org.openrdf.sesame/sesame-repository-sail
@Override
protected void throwInterruptedException()
throws QueryEvaluationException
{
throw new QueryInterruptedException("execution took too long");
}
};
代码示例来源:origin: org.openrdf.sesame/sesame-repository-sparql
@Override
public void execute()
throws UpdateExecutionException
{
try {
// execute update immediately
SparqlSession client = getHttpClient();
try {
client.sendUpdate(getQueryLanguage(), getQueryString(), getBaseURI(), dataset, includeInferred,
getMaxExecutionTime(), getBindingsArray());
}
catch (UnauthorizedException e) {
throw new UpdateExecutionException(e.getMessage(), e);
}
catch (QueryInterruptedException e) {
throw new UpdateExecutionException(e.getMessage(), e);
}
catch (MalformedQueryException e) {
throw new UpdateExecutionException(e.getMessage(), e);
}
catch (IOException e) {
throw new UpdateExecutionException(e.getMessage(), e);
}
}
catch (RepositoryException e) {
throw new UpdateExecutionException(e.getMessage(), e);
}
}
代码示例来源:origin: apache/marmotta
@Override
protected QueryEvaluationException convert(Exception e) {
if (e instanceof ClosedByInterruptException) {
return new QueryInterruptedException(e);
}
else if (e instanceof IOException) {
return new QueryEvaluationException(e);
}
else if (e instanceof RuntimeException) {
throw (RuntimeException)e;
}
else if (e == null) {
throw new IllegalArgumentException("e must not be null");
}
else {
throw new IllegalArgumentException("Unexpected exception type: " + e.getClass());
}
}
};
代码示例来源:origin: apache/marmotta
@Override
protected QueryEvaluationException convert(Exception e) {
if (e instanceof ClosedByInterruptException) {
return new QueryInterruptedException(e);
}
else if (e instanceof IOException) {
return new QueryEvaluationException(e);
}
else if (e instanceof RuntimeException) {
throw (RuntimeException)e;
}
else if (e == null) {
throw new IllegalArgumentException("e must not be null");
}
else {
throw new IllegalArgumentException("Unexpected exception type: " + e.getClass());
}
}
};
代码示例来源:origin: apache/marmotta
@Override
protected QueryEvaluationException convert(Exception e) {
if (e instanceof ClosedByInterruptException) {
return new QueryInterruptedException(e);
}
if (e instanceof IOException) {
return new QueryEvaluationException(e);
}
if (e instanceof SailException) {
if(e.getCause() instanceof ResultInterruptedException) {
return new QueryInterruptedException(e);
}
return new QueryEvaluationException(e);
}
if (e instanceof RuntimeException) {
throw (RuntimeException)e;
}
if (e == null) {
throw new IllegalArgumentException("e must not be null");
}
throw new IllegalArgumentException("Unexpected exception type: " + e.getClass(),e);
}
};
代码示例来源:origin: org.apache.marmotta/kiwi-triplestore
@Override
protected QueryEvaluationException convert(Exception e) {
if (e instanceof ClosedByInterruptException) {
return new QueryInterruptedException(e);
}
if (e instanceof IOException) {
return new QueryEvaluationException(e);
}
if (e instanceof SailException) {
if(e.getCause() instanceof ResultInterruptedException) {
return new QueryInterruptedException(e);
}
return new QueryEvaluationException(e);
}
if (e instanceof RuntimeException) {
throw (RuntimeException)e;
}
if (e == null) {
throw new IllegalArgumentException("e must not be null");
}
throw new IllegalArgumentException("Unexpected exception type: " + e.getClass(),e);
}
};
代码示例来源:origin: apache/marmotta
queryStatement.close();
throw new QueryInterruptedException("SPARQL query execution cancelled");
} catch (ExecutionException e) {
log.error("error executing SPARQL query", e.getCause());
throw new QueryEvaluationException(e.getCause());
} else if (e.getCause() instanceof InterruptedException) {
throw new QueryInterruptedException(e.getCause());
} else {
throw new QueryEvaluationException("error executing SPARQL query", e);
代码示例来源:origin: org.openrdf.sesame/sesame-http-client
throw new UnauthorizedException();
case HttpURLConnection.HTTP_UNAVAILABLE: // 503
throw new QueryInterruptedException();
default:
ErrorInfo errInfo = getErrorInfo(response);
代码示例来源:origin: blazegraph/database
throw new QueryInterruptedException(t);
代码示例来源:origin: com.blazegraph/bigdata-core
throw new QueryInterruptedException(t);
内容来源于网络,如有侵权,请联系作者删除!