You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2015/09/22 11:25:12 UTC
svn commit: r1704490 - in
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document:
LastRevRecoveryAgent.java MissingLastRevSeeker.java
Author: reschke
Date: Tue Sep 22 09:25:08 2015
New Revision: 1704490
URL: http://svn.apache.org/viewvc?rev=1704490&view=rev
Log:
Whitespace and Javadoc fixes
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/LastRevRecoveryAgent.java
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/MissingLastRevSeeker.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/LastRevRecoveryAgent.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/LastRevRecoveryAgent.java?rev=1704490&r1=1704489&r2=1704490&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/LastRevRecoveryAgent.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/LastRevRecoveryAgent.java Tue Sep 22 09:25:08 2015
@@ -68,9 +68,9 @@ public class LastRevRecoveryAgent {
/**
* Recover the correct _lastRev updates for potentially missing candidate nodes.
- *
+ *
* @param clusterId the cluster id for which the _lastRev are to be recovered
- * @return the int the number of restored nodes
+ * @return the number of restored nodes
*/
public int recover(int clusterId) {
ClusterNodeInfoDocument nodeInfo = missingLastRevUtil.getClusterNodeInfo(clusterId);
@@ -124,7 +124,7 @@ public class LastRevRecoveryAgent {
/**
* Recover the correct _lastRev updates for the given candidate nodes.
- *
+ *
* @param suspects the potential suspects
* @param clusterId the cluster id for which _lastRev recovery needed
* @param dryRun if {@code true}, this method will only perform a check
@@ -211,7 +211,7 @@ public class LastRevRecoveryAgent {
unsaved.put(parentPath, calcLastRev);
}
}
-
+
// take the root's lastRev
final Revision lastRootRev = unsaved.get("/");
@@ -273,10 +273,10 @@ public class LastRevRecoveryAgent {
/**
* Retrieves possible candidates which have been modified after the given
* {@code startTime} and recovers the missing updates.
- *
+ *
* @param clusterId the cluster id
* @param startTime the start time
- * @return the int the number of restored nodes
+ * @return the number of restored nodes
*/
private int recoverCandidates(final int clusterId, final long startTime) {
boolean lockAcquired = missingLastRevUtil.acquireRecoveryLock(clusterId);
@@ -313,7 +313,7 @@ public class LastRevRecoveryAgent {
/**
* Determines the last committed modification to the given document by
* a {@code clusterId}.
- *
+ *
* @param doc a document.
* @param clusterId clusterId for which the last committed modification is
* looked up.
@@ -359,7 +359,7 @@ public class LastRevRecoveryAgent {
}
}
}
-
+
/**
* Gets the _lastRev recovery candidate cluster nodes.
*
@@ -368,16 +368,16 @@ public class LastRevRecoveryAgent {
public List<Integer> getRecoveryCandidateNodes() {
Iterable<ClusterNodeInfoDocument> clusters = missingLastRevUtil.getAllClusters();
List<Integer> candidateClusterNodes = Lists.newArrayList();
-
+
for (ClusterNodeInfoDocument nodeInfo : clusters) {
if (isRecoveryNeeded(nodeInfo)) {
candidateClusterNodes.add(Integer.valueOf(nodeInfo.getId()));
}
}
-
+
return candidateClusterNodes;
}
-
+
private boolean isRecoveryNeeded(ClusterNodeInfoDocument nodeInfo) {
if (nodeInfo != null) {
// Check if _lastRev recovery needed for this cluster node
@@ -390,7 +390,7 @@ public class LastRevRecoveryAgent {
}
return false;
}
-
+
private static class ClusterPredicate implements Predicate<Revision> {
private final int clusterId;
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/MissingLastRevSeeker.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/MissingLastRevSeeker.java?rev=1704490&r1=1704489&r2=1704490&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/MissingLastRevSeeker.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/MissingLastRevSeeker.java Tue Sep 22 09:25:08 2015
@@ -69,7 +69,7 @@ public class MissingLastRevSeeker {
*/
public Iterable<NodeDocument> getCandidates(final long startTime) {
// Fetch all documents where lastmod >= startTime
- Iterable<NodeDocument> nodes = getSelectedDocuments(store,
+ Iterable<NodeDocument> nodes = getSelectedDocuments(store,
MODIFIED_IN_SECS, getModifiedInSecs(startTime));
return Iterables.filter(nodes, new Predicate<NodeDocument>() {
@Override
@@ -113,4 +113,3 @@ public class MissingLastRevSeeker {
return false;
}
}
-