Class ReferencesUtil
- java.lang.Object
-
- org.projectnessie.versioned.persist.adapter.ReferencesUtil
-
@Beta public final class ReferencesUtil extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReferencesUtil.IdentifyHeadsAndForkPoints
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReferencesUtilforDatabaseAdapter(DatabaseAdapter databaseAdapter)HeadsAndForkPointsidentifyAllHeadsAndForkPoints(int expectedCommitCount, java.util.function.Consumer<CommitLogEntry> commitHandler)Identifies all heads and fork-points.ReferencedAndUnreferencedHeadsidentifyReferencedAndUnreferencedHeads(HeadsAndForkPoints headsAndForkPoints)Identifies unreferenced heads and heads that are part of a named reference.
-
-
-
Method Detail
-
forDatabaseAdapter
public static ReferencesUtil forDatabaseAdapter(DatabaseAdapter databaseAdapter)
-
identifyAllHeadsAndForkPoints
public HeadsAndForkPoints identifyAllHeadsAndForkPoints(int expectedCommitCount, java.util.function.Consumer<CommitLogEntry> commitHandler)
Identifies all heads and fork-points.- "Heads" are commits that are not referenced by other commits.
- "Fork points" are commits that are the parent of more than one other commit. Knowing these commits can help to optimize the traversal of commit logs of multiple heads.
- Parameters:
expectedCommitCount- it is recommended to tell the implementation the total number of commits in the Nessie repositorycommitHandler- called for every commit while scanning all commits
-
identifyReferencedAndUnreferencedHeads
public ReferencedAndUnreferencedHeads identifyReferencedAndUnreferencedHeads(HeadsAndForkPoints headsAndForkPoints) throws org.projectnessie.versioned.ReferenceNotFoundException
Identifies unreferenced heads and heads that are part of a named reference.Requires the output of
identifyAllHeadsAndForkPoints(int, Consumer).- Throws:
org.projectnessie.versioned.ReferenceNotFoundException
-
-