public class MissingLastRevSeeker extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.jackrabbit.oak.stats.Clock |
clock |
protected String |
ROOT_PATH |
| Constructor and Description |
|---|
MissingLastRevSeeker(DocumentStore store,
org.apache.jackrabbit.oak.stats.Clock clock) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireRecoveryLock(int clusterId,
int recoveredBy)
Acquire a recovery lock for the given cluster node info document.
|
@NotNull Iterable<ClusterNodeInfoDocument> |
getAllClusters()
Gets the clusters which potentially need _lastRev recovery.
|
@NotNull Iterable<NodeDocument> |
getCandidates(long startTime)
Get the candidates with modified time greater than or equal the specified
startTime in milliseconds since the start of the epoch. |
@Nullable ClusterNodeInfoDocument |
getClusterNodeInfo(int clusterId)
Gets the cluster node info for the given cluster node id.
|
NodeDocument |
getRoot() |
boolean |
isRecoveryNeeded()
Returns
true if any of the cluster node info documents satisfies
ClusterNodeInfoDocument.isRecoveryNeeded(long) where the passed
timestamp is the current time. |
boolean |
isRecoveryNeeded(@NotNull ClusterNodeInfoDocument nodeInfo)
Deprecated.
use
ClusterNodeInfoDocument.isRecoveryNeeded(long)
instead. |
void |
releaseRecoveryLock(int clusterId,
boolean success)
Releases the recovery lock on the given
clusterId. |
protected final String ROOT_PATH
protected final org.apache.jackrabbit.oak.stats.Clock clock
public MissingLastRevSeeker(DocumentStore store, org.apache.jackrabbit.oak.stats.Clock clock)
@NotNull public @NotNull Iterable<ClusterNodeInfoDocument> getAllClusters()
@Nullable public @Nullable ClusterNodeInfoDocument getClusterNodeInfo(int clusterId)
clusterId - the cluster id@NotNull public @NotNull Iterable<NodeDocument> getCandidates(long startTime)
startTime in milliseconds since the start of the epoch.startTime - the start time in milliseconds.public boolean acquireRecoveryLock(int clusterId,
int recoveredBy)
clusterId - id of the cluster that is going to be recoveredrecoveredBy - id of cluster doing the recoverypublic void releaseRecoveryLock(int clusterId,
boolean success)
clusterId. If
success is true, the state of the cluster node entry
is reset, otherwise it is left as is. That is, for a cluster node which
requires recovery and the recovery process failed, the state will still
be active, when this release method is called with success set
to false.clusterId - the id of the cluster node that was recovered.success - whether recovery was successful.public NodeDocument getRoot()
public boolean isRecoveryNeeded()
true if any of the cluster node info documents satisfies
ClusterNodeInfoDocument.isRecoveryNeeded(long) where the passed
timestamp is the current time.true if any of the cluster nodes need recovery,
false otherwise.public boolean isRecoveryNeeded(@NotNull
@NotNull ClusterNodeInfoDocument nodeInfo)
ClusterNodeInfoDocument.isRecoveryNeeded(long)
instead.Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.