本文整理了Java中org.apache.tephra.Transaction.getFirstInProgress()
方法的一些代码示例,展示了Transaction.getFirstInProgress()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transaction.getFirstInProgress()
方法的具体详情如下:
包路径:org.apache.tephra.Transaction
类名称:Transaction
方法名:getFirstInProgress
暂无
代码示例来源:origin: org.apache.tephra/tephra-core
/**
* Returns the maximum transaction that can be removed from the invalid list for the state represented by the given
* transaction.
*/
public static long getPruneUpperBound(Transaction tx) {
// If there are no invalid transactions, and no in-progress transactions then we can prune the invalid list
// up to the current read pointer
if (tx.getInvalids().length == 0 && tx.getInProgress().length == 0) {
return tx.getReadPointer() - 1;
}
long maxInvalidTx =
tx.getInvalids().length > 0 ? tx.getInvalids()[tx.getInvalids().length - 1] : Transaction.NO_TX_IN_PROGRESS;
long firstInProgress = tx.getFirstInProgress();
return Math.min(maxInvalidTx, firstInProgress - 1);
}
代码示例来源:origin: co.cask.cdap/cdap-data-fabric
if (firstScannedRow && writePointer < transaction.getFirstInProgress()) {
firstScannedRow = false;
scanStartRow = Arrays.copyOf(rowKey, rowKey.length);
内容来源于网络,如有侵权,请联系作者删除!