java.lang.Object
org.eclipse.jgit.internal.storage.midx.PackIndexMerger
Collect the stats and offers an iterator over the union of n-pack indexes.
The multipack index is a list of (sha1, packid, offset) ordered by sha1. We can build it from the individual pack indexes (sha1, offset) ordered by sha1, with a simple merge ignoring duplicates.
This class encapsulates the merging logic and precalculates the stats that the index needs (like total count of objects). To limit memory consumption, it does the merge as it goes during the iteration and iterators use mutable entries. The stats of the combined index are calculated in an iteration at construction time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder collecting the inputs for the merger. -
Method Summary
-
Method Details
-
builder
Create a builder- Returns:
- an empty builder
-