提交 04a7dc4e authored 作者: Andrei Tokar's avatar Andrei Tokar

another round of addressing code review comments

上级 a2519151
......@@ -10,7 +10,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
......
......@@ -242,7 +242,7 @@ public class TransactionStore {
* @param operationId the operation id
* @return the transaction id
*/
public static int getTransactionId(long operationId) {
static int getTransactionId(long operationId) {
return (int) (operationId >>> LOG_ID_BITS);
}
......
......@@ -6,7 +6,6 @@
package org.h2.mvstore.tx;
import org.h2.mvstore.MVMap;
import static org.h2.mvstore.tx.TransactionStore.getTransactionId;
/**
* Class TxDecisionMaker.
......@@ -39,7 +38,7 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue
// or entry is a committed one
(id = existingValue.getOperationId()) == 0 ||
// or it came from the same transaction
isThisTransaction(blockingId = getTransactionId(id))) {
isThisTransaction(blockingId = TransactionStore.getTransactionId(id))) {
logIt(existingValue);
decision = MVMap.Decision.PUT;
} else if (isCommitted(blockingId)) {
......@@ -137,7 +136,7 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue
long id = existingValue.getOperationId();
if (id == 0 // entry is a committed one
// or it came from the same transaction
|| isThisTransaction(blockingId = getTransactionId(id))) {
|| isThisTransaction(blockingId = TransactionStore.getTransactionId(id))) {
if(existingValue.value != null) {
return setDecision(MVMap.Decision.ABORT);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论