Package org.projectnessie.gc.identify
Class DefaultVisitedDeduplicator
- java.lang.Object
-
- org.projectnessie.gc.identify.DefaultVisitedDeduplicator
-
- All Implemented Interfaces:
VisitedDeduplicator
public final class DefaultVisitedDeduplicator extends java.lang.Object implements VisitedDeduplicator
Helper to avoid duplicate Nessie commit log scan, considering the effectivecutoffTimestamp.Assumes that a commit log scan with cut-off timestamp "A" can be aborted, when a commit log scan with cut-off timestamp "B" has already processed the same commit ID AND
B <= A.Maintains a map of cutoff-timestamp to a set of visited commits. If a given commit has already been visited with a cutoff-timestamp that is equal to or older than the given cutoff-timestamp, live-contents-identification can stop.
NOTE: the reason that this deduplicator is not wired up to the Nessie GC tool is that the exact heap pressure needs to be thoroughly determined, because a Java OutOfMemory situation must be avoided.
-
-
Field Summary
-
Fields inherited from interface org.projectnessie.gc.identify.VisitedDeduplicator
NOOP
-
-
Constructor Summary
Constructors Constructor Description DefaultVisitedDeduplicator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanalreadyVisited(java.time.Instant cutoffTimestamp, java.lang.String commitId)
-
-
-
Method Detail
-
alreadyVisited
public boolean alreadyVisited(@Nonnull java.time.Instant cutoffTimestamp, @Nonnull java.lang.String commitId)- Specified by:
alreadyVisitedin interfaceVisitedDeduplicator
-
-