本文整理了Java中com.baidu.hugegraph.backend.query.Query.defaultCapacity
方法的一些代码示例,展示了Query.defaultCapacity
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.defaultCapacity
方法的具体详情如下:
包路径:com.baidu.hugegraph.backend.query.Query
类名称:Query
方法名:defaultCapacity
暂无
代码示例来源:origin: hugegraph/hugegraph
public Query(HugeType resultType, Query originQuery) {
this.resultType = resultType;
this.originQuery = originQuery;
this.orders = new LinkedHashMap<>();
this.offset = 0L;
this.limit = NO_LIMIT;
this.page = null;
this.capacity = defaultCapacity();
this.showHidden = false;
}
代码示例来源:origin: hugegraph/hugegraph
@Override
public Object execute() throws Exception {
GremlinRequest input = GremlinRequest.fromJson(this.task().input());
input.binding(TASK_BIND_NAME, new GremlinJobProxy());
HugeScriptTraversal<?, ?> st;
st = new HugeScriptTraversal<>(this.graph().traversal(),
input.language(), input.gremlin(),
input.bindings(), input.aliases());
List<Object> results = new ArrayList<>();
long capacity = Query.defaultCapacity(Query.NO_CAPACITY);
try {
while (st.hasNext()) {
Object result = st.next();
results.add(result);
checkResultsSize(results);
Thread.yield();
}
} finally {
Query.defaultCapacity(capacity);
st.close();
this.graph().tx().commit();
}
Object result = st.result();
if (result != null) {
checkResultsSize(result);
return result;
} else {
return results;
}
}
代码示例来源:origin: com.baidu.hugegraph/hugegraph-core
public Query(HugeType resultType, Query originQuery) {
this.resultType = resultType;
this.originQuery = originQuery;
this.orders = new LinkedHashMap<>();
this.offset = 0L;
this.limit = NO_LIMIT;
this.page = null;
this.capacity = defaultCapacity();
this.showHidden = false;
}
内容来源于网络,如有侵权,请联系作者删除!