| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| public static record | FakeIndexFactory.
An object for the fake index |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PackIndex | Returns: a PackIndex implementationobjects to be indexed objsReturn an index populated with these objects |
| public static PackReverseIndex | Returns: a PackReverseIndex implementationobjects to be indexed objsReturn a reverse pack index with these objects |
| FakeIndexFactory | back to summary |
|---|---|
| private FakeIndexFactory() | |
| indexOf | back to summary |
|---|---|
| public static PackIndex indexOf(List<FakeIndexFactory. Return an index populated with these objects
| |
| reverseIndexOf | back to summary |
|---|---|
| public static PackReverseIndex reverseIndexOf(List<FakeIndexFactory. Return a reverse pack index with these objects
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final byte[] | |
| private final Iterator |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | readNext()
Implements abstract org. Used by subclasses to load the next entry into the MutableEntry. |
| buffer | back to summary |
|---|---|
| private static final byte[] buffer | |
| it | back to summary |
|---|---|
| private final Iterator<FakeIndexFactory. | |
| FakeEntriesIterator | back to summary |
|---|---|
| pack-priv FakeEntriesIterator(List<FakeIndexFactory. | |
| readNext | back to summary |
|---|---|
| protected void readNext() Implements abstract org. Doc from org. Used by subclasses to load the next entry into the MutableEntry.
Subclasses are expected to populate the entry with
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final long | |
| private static final Comparator | |
| private final List |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | findCRC32(AnyObjectId
id of object to look for objId)Implements org. Retrieve stored CRC32 checksum of the requested object raw-data (including header). |
| public long | findOffset(AnyObjectId
name of the object to locate within the pack. objId)Implements org. Locate the file offset position for the requested object. |
| public int | findPosition(AnyObjectId
name of the object to locate within the index objId)Implements org. Locate the position of this id in the list of object-ids in the index |
| public byte[] | getChecksum()
Implements org. Get pack checksum |
| public long | getObjectCount()
Implements org. Obtain the total number of objects described by this index. |
| public ObjectId | getObjectId(long
position within the traversal of nthPosition)iterator() that the
caller needs the object for. The first returned
org.
is 0, the second is 1, etc.Implements org. Get ObjectId for the n-th object entry returned by |
| public long | getOffset(long
unsigned 32 bit position within the traversal of
nthPosition)iterator() for which the caller needs the offset. The
first returned MutableEntry is 0, the second is 1,
etc. Positions past 2**31-1 are negative, but still valid.Implements org. Get offset in a pack for the n-th object entry returned by
|
| public long | getOffset64Count()
Implements org. Obtain the total number of objects needing 64 bit offsets. |
| public boolean | hasCRC32Support()
Implements org. Check whether this index supports (has) CRC32 checksums for objects. |
| public Iterator | iterator()
Implements org. Returns an iterator over elements of type |
| public void | resolve(Set<ObjectId>
set to add any located ObjectIds to. This is an output
parameter. matches, AbbreviatedObjectId prefix to search for. id, int maximum number of results to return. At most this many
ObjectIds should be added to matches before returning. matchLimit)Implements org. Find objects matching the prefix abbreviation. |
| idx | back to summary |
|---|---|
| private final Map<String, FakeIndexFactory. | |
| offset64count | back to summary |
|---|---|
| private final long offset64count | |
| SHA1_COMPARATOR | back to summary |
|---|---|
| private static final Comparator<FakeIndexFactory. | |
| sha1Ordered | back to summary |
|---|---|
| private final List<FakeIndexFactory. | |
| FakePackIndex | back to summary |
|---|---|
| pack-priv FakePackIndex(List<FakeIndexFactory. | |
| findCRC32 | back to summary |
|---|---|
| public long findCRC32(AnyObjectId objId) throws MissingObjectException Implements org. Doc from org. Retrieve stored CRC32 checksum of the requested object raw-data (including header).
| |
| findOffset | back to summary |
|---|---|
| public long findOffset(AnyObjectId objId) Implements org. Doc from org. Locate the file offset position for the requested object.
| |
| findPosition | back to summary |
|---|---|
| public int findPosition(AnyObjectId objId) Implements org. Doc from org. Locate the position of this id in the list of object-ids in the index
| |
| getChecksum | back to summary |
|---|---|
| public byte[] getChecksum() Implements org. Doc from org. Get pack checksum
| |
| getObjectCount | back to summary |
|---|---|
| public long getObjectCount() Implements org. Doc from org. Obtain the total number of objects described by this index.
| |
| getObjectId | back to summary |
|---|---|
| public ObjectId getObjectId(long nthPosition) Implements org. Doc from org. Get ObjectId for the n-th object entry returned by This method is a constant-time replacement for the following loop: Iterator<MutableEntry> eItr = index.iterator(); int curPosition = 0; while (eItr.hasNext() && curPosition++ < nthPosition) eItr.next(); ObjectId result = eItr.next().toObjectId();
| |
| getOffset | back to summary |
|---|---|
| public long getOffset(long nthPosition) Implements org. Doc from org. Get offset in a pack for the n-th object entry returned by
| |
| getOffset64Count | back to summary |
|---|---|
| public long getOffset64Count() Implements org. Doc from org. Obtain the total number of objects needing 64 bit offsets.
| |
| hasCRC32Support | back to summary |
|---|---|
| public boolean hasCRC32Support() Implements org. Doc from org. Check whether this index supports (has) CRC32 checksums for objects.
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements org. Doc from org. Returns an iterator over elements of type Provide iterator that gives access to index entries. Note, that iterator returns reference to mutable object, the same reference in each call - for performance reason. If client needs immutable objects, it must copy returned object on its own. Iterator returns objects in SHA-1 lexicographical order.
| |
| resolve | back to summary |
|---|---|
| public void resolve(Set<ObjectId> matches, AbbreviatedObjectId id, int matchLimit) throws IOException Implements org. Doc from org. Find objects matching the prefix abbreviation.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private static final Comparator | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | findNextOffset(long
start offset of previous object (must be valid-existing
offset). offset, long maximum offset in a pack (returned when there is no next
offset). maxOffset)Implements org. Search for the next offset to the specified offset in this pack (reverse) index. |
| public ObjectId | findObject(long
start offset of object to find. offset)Implements org. Search for object id with the specified start offset in this pack (reverse) index. |
| public ObjectId | findObjectByPosition(int
the position of the object in the reverse index nthPosition)Implements org. Find the object that is in the given position in the reverse index. |
| public int | findPosition(long
the pack offset of the object offset)Implements org. Find the position in the reverse index of the object at the given pack offset. |
| public void | verifyPackChecksum(String
the path to display in event of a mismatch packFilePath)Implements org. Verify that the pack checksum found in the reverse index matches that from the pack file. |
| byOffset | back to summary |
|---|---|
| private final List<FakeIndexFactory. | |
| OFFSET_COMPARATOR | back to summary |
|---|---|
| private static final Comparator<FakeIndexFactory. | |
| ridx | back to summary |
|---|---|
| private final Map<Long, FakeIndexFactory. | |
| FakeReverseIndex | back to summary |
|---|---|
| pack-priv FakeReverseIndex(List<FakeIndexFactory. | |
| findNextOffset | back to summary |
|---|---|
| public long findNextOffset(long offset, long maxOffset) throws CorruptObjectException Implements org. Doc from org. Search for the next offset to the specified offset in this pack (reverse) index.
| |
| findObject | back to summary |
|---|---|
| public ObjectId findObject(long offset) Implements org. Doc from org. Search for object id with the specified start offset in this pack (reverse) index. | |
| findObjectByPosition | back to summary |
|---|---|
| public ObjectId findObjectByPosition(int nthPosition) Implements org. Doc from org. Find the object that is in the given position in the reverse index. | |
| findPosition | back to summary |
|---|---|
| public int findPosition(long offset) Implements org. Doc from org. Find the position in the reverse index of the object at the given pack offset.
| |
| verifyPackChecksum | back to summary |
|---|---|
| public void verifyPackChecksum(String packFilePath) Implements org. Doc from org. Verify that the pack checksum found in the reverse index matches that from the pack file. | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object
the reference object with which to compare. o)Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public ObjectId | |
| public final int | |
| public String | |
| public long | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| name | back to summary |
|---|---|
| private final String name Record Component accessed by name(). a sha1 | |
| offset | back to summary |
|---|---|
| private final long offset Record Component accessed by offset(). the (fake) position of the object in the pack | |
| IndexObject | back to summary |
|---|---|
| public IndexObject(String name, long offset) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| getObjectId | back to summary |
|---|---|
| public ObjectId getObjectId() Name (sha1) as an objectId
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| name | back to summary |
|---|---|
| public String name() Record Component getter of name.
| |
| offset | back to summary |
|---|---|
| public long offset() Record Component getter of offset.
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |