Class MongoMissingLastRevSeeker
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.MissingLastRevSeeker
-
- org.apache.jackrabbit.oak.plugins.document.mongo.MongoMissingLastRevSeeker
-
public class MongoMissingLastRevSeeker extends MissingLastRevSeeker
Mongo specific version of MissingLastRevSeeker which uses mongo queries to fetch candidates which may have missed '_lastRev' updates. Uses a time range to find documents modified during that interval.
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.oak.plugins.document.MissingLastRevSeeker
clock
-
-
Constructor Summary
Constructors Constructor Description MongoMissingLastRevSeeker(MongoDocumentStore store, Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull CloseableIterable<NodeDocument>
getCandidates(long startTime)
Get the candidates with modified time greater than or equal the specifiedstartTime
in milliseconds since the start of the epoch.boolean
isRecoveryNeeded()
Returnstrue
if any of the cluster node info documents satisfiesClusterNodeInfoDocument.isRecoveryNeeded(long)
where the passed timestamp is the current time.-
Methods inherited from class org.apache.jackrabbit.oak.plugins.document.MissingLastRevSeeker
acquireRecoveryLock, getAllClusters, getClusterNodeInfo, getRoot, isRecoveryNeeded, releaseRecoveryLock
-
-
-
-
Constructor Detail
-
MongoMissingLastRevSeeker
public MongoMissingLastRevSeeker(MongoDocumentStore store, Clock clock)
-
-
Method Detail
-
getCandidates
@NotNull public @NotNull CloseableIterable<NodeDocument> getCandidates(long startTime)
Description copied from class:MissingLastRevSeeker
Get the candidates with modified time greater than or equal the specifiedstartTime
in milliseconds since the start of the epoch.- Overrides:
getCandidates
in classMissingLastRevSeeker
- Parameters:
startTime
- the start time in milliseconds.- Returns:
- the candidates
-
isRecoveryNeeded
public boolean isRecoveryNeeded()
Description copied from class:MissingLastRevSeeker
Returnstrue
if any of the cluster node info documents satisfiesClusterNodeInfoDocument.isRecoveryNeeded(long)
where the passed timestamp is the current time.- Overrides:
isRecoveryNeeded
in classMissingLastRevSeeker
- Returns:
true
if any of the cluster nodes need recovery,false
otherwise.
-
-