How to set read timeout per query using Java REST binding?

放肆的年华 提交于 2019-12-25 00:39:23

问题


I am using Neo4j 1.9.1 and Kernel 1.8, I want to specify read time out for few queries ...

Thanks in advance.


回答1:


I'm not sure if that is directly possible. You need to enable guards by config in your server and set a http header max-execution-time as described in Mark's blog post at http://www.markhneedham.com/blog/2013/10/17/neo4j-setting-query-timeout/.

Java Rest bindings need to be tweaked, see https://github.com/neo4j-contrib/java-rest-binding/blob/master/src/main/java/org/neo4j/rest/graphdb/ExecutingRestRequest.java#L102 for how to explicitly set an http header. The same thing can be done for max-execution-time.



来源:https://stackoverflow.com/questions/26113461/how-to-set-read-timeout-per-query-using-java-rest-binding

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!