本文整理了Java中com.thinkaurelius.titan.graphdb.query.QueryUtil.adjustLimitForTxModifications
方法的一些代码示例,展示了QueryUtil.adjustLimitForTxModifications
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryUtil.adjustLimitForTxModifications
方法的具体详情如下:
包路径:com.thinkaurelius.titan.graphdb.query.QueryUtil
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!