com.baidu.hugegraph.backend.query.Query.defaultCapacity()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中com.baidu.hugegraph.backend.query.Query.defaultCapacity方法的一些代码示例,展示了Query.defaultCapacity的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.defaultCapacity方法的具体详情如下:
包路径:com.baidu.hugegraph.backend.query.Query
类名称:Query
方法名:defaultCapacity

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;
}

相关文章