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 specifiedstartTimein milliseconds since the start of the epoch.booleanisRecoveryNeeded()Returnstrueif 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:MissingLastRevSeekerGet the candidates with modified time greater than or equal the specifiedstartTimein milliseconds since the start of the epoch.- Overrides:
getCandidatesin classMissingLastRevSeeker- Parameters:
startTime- the start time in milliseconds.- Returns:
- the candidates
-
isRecoveryNeeded
public boolean isRecoveryNeeded()
Description copied from class:MissingLastRevSeekerReturnstrueif any of the cluster node info documents satisfiesClusterNodeInfoDocument.isRecoveryNeeded(long)where the passed timestamp is the current time.- Overrides:
isRecoveryNeededin classMissingLastRevSeeker- Returns:
trueif any of the cluster nodes need recovery,falseotherwise.
-
-