com.thinkaurelius.titan.graphdb.query.QueryUtil.adjustLimitForTxModifications()方法的使用及代码示例

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

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

QueryUtil.adjustLimitForTxModifications介绍

暂无

代码示例

代码示例来源:origin: thinkaurelius/titan

/**
 * Updates a given user limit based on the number of conditions that can not be fulfilled by the backend query, i.e. the query
 * is not fitted and these remaining conditions must be enforced by filtering in-memory. By filtering in memory, we will discard
 * results returned from the backend and hence we should increase the limit to account for this "waste" in order to not have
 * to adjust the limit too often in {@link com.thinkaurelius.titan.graphdb.query.LimitAdjustingIterator}.
 *
 * @param remainingConditions
 * @param baseLimit
 * @return
 */
private int computeLimit(int remainingConditions, int baseLimit) {
  if (baseLimit==Query.NO_LIMIT) return baseLimit;
  assert baseLimit>0;
  baseLimit = Math.max(baseLimit,Math.min(HARD_MAX_LIMIT, QueryUtil.adjustLimitForTxModifications(tx, remainingConditions, baseLimit)));
  assert baseLimit>0;
  return baseLimit;
}

代码示例来源:origin: thinkaurelius/titan

indexLimit = limit == Query.NO_LIMIT ? DEFAULT_NO_LIMIT : Math.min(MAX_BASE_LIMIT, limit);
indexLimit = Math.min(HARD_MAX_LIMIT, QueryUtil.adjustLimitForTxModifications(tx, coveredClauses.size(), indexLimit));
jointQuery.setLimit(indexLimit);
query = new BackendQueryHolder<JointIndexQuery>(jointQuery, coveredClauses.size()==conditions.numChildren(), isSorted);

代码示例来源:origin: com.thinkaurelius.titan/titan-core

/**
 * Updates a given user limit based on the number of conditions that can not be fulfilled by the backend query, i.e. the query
 * is not fitted and these remaining conditions must be enforced by filtering in-memory. By filtering in memory, we will discard
 * results returned from the backend and hence we should increase the limit to account for this "waste" in order to not have
 * to adjust the limit too often in {@link com.thinkaurelius.titan.graphdb.query.LimitAdjustingIterator}.
 *
 * @param remainingConditions
 * @param baseLimit
 * @return
 */
private int computeLimit(int remainingConditions, int baseLimit) {
  if (baseLimit==Query.NO_LIMIT) return baseLimit;
  assert baseLimit>0;
  baseLimit = Math.max(baseLimit,Math.min(HARD_MAX_LIMIT, QueryUtil.adjustLimitForTxModifications(tx, remainingConditions, baseLimit)));
  assert baseLimit>0;
  return baseLimit;
}

代码示例来源:origin: org.hawkular.titan/titan-core

/**
 * Updates a given user limit based on the number of conditions that can not be fulfilled by the backend query, i.e. the query
 * is not fitted and these remaining conditions must be enforced by filtering in-memory. By filtering in memory, we will discard
 * results returned from the backend and hence we should increase the limit to account for this "waste" in order to not have
 * to adjust the limit too often in {@link com.thinkaurelius.titan.graphdb.query.LimitAdjustingIterator}.
 *
 * @param remainingConditions
 * @param baseLimit
 * @return
 */
private int computeLimit(int remainingConditions, int baseLimit) {
  if (baseLimit==Query.NO_LIMIT) return baseLimit;
  assert baseLimit>0;
  baseLimit = Math.max(baseLimit,Math.min(HARD_MAX_LIMIT, QueryUtil.adjustLimitForTxModifications(tx, remainingConditions, baseLimit)));
  assert baseLimit>0;
  return baseLimit;
}

代码示例来源:origin: org.hawkular.titan/titan-core

indexLimit = limit == Query.NO_LIMIT ? DEFAULT_NO_LIMIT : Math.min(MAX_BASE_LIMIT, limit);
indexLimit = Math.min(HARD_MAX_LIMIT, QueryUtil.adjustLimitForTxModifications(tx, coveredClauses.size(), indexLimit));
jointQuery.setLimit(indexLimit);
query = new BackendQueryHolder<JointIndexQuery>(jointQuery, coveredClauses.size()==conditions.numChildren(), isSorted, null);

代码示例来源:origin: com.thinkaurelius.titan/titan-core

indexLimit = limit == Query.NO_LIMIT ? DEFAULT_NO_LIMIT : Math.min(MAX_BASE_LIMIT, limit);
indexLimit = Math.min(HARD_MAX_LIMIT, QueryUtil.adjustLimitForTxModifications(tx, coveredClauses.size(), indexLimit));
jointQuery.setLimit(indexLimit);
query = new BackendQueryHolder<JointIndexQuery>(jointQuery, coveredClauses.size()==conditions.numChildren(), isSorted);

代码示例来源:origin: org.apache.atlas/atlas-titan

indexLimit = limit == Query.NO_LIMIT ? DEFAULT_NO_LIMIT : Math.min(MAX_BASE_LIMIT, limit);
indexLimit = Math.min(HARD_MAX_LIMIT, QueryUtil.adjustLimitForTxModifications(tx, coveredClauses.size(), indexLimit));
jointQuery.setLimit(indexLimit);
query = new BackendQueryHolder<JointIndexQuery>(jointQuery, coveredClauses.size()==conditions.numChildren(), isSorted, null);

代码示例来源:origin: apache/incubator-atlas

indexLimit = limit == Query.NO_LIMIT ? DEFAULT_NO_LIMIT : Math.min(MAX_BASE_LIMIT, limit);
indexLimit = Math.min(HARD_MAX_LIMIT, QueryUtil.adjustLimitForTxModifications(tx, coveredClauses.size(), indexLimit));
jointQuery.setLimit(indexLimit);
query = new BackendQueryHolder<>(jointQuery, coveredClauses.size() == conditions.numChildren(), isSorted, null);

相关文章