| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private byte[][] | |
| private static final int | |
| private final long[] | |
| private static final long | |
| pack-priv int[][] | names
256 arrays of contiguous object names. |
| private static final byte[] | |
| private static final int[] | |
| private long | |
| pack-priv byte[][] | |
| pack-priv byte[] | offset64
64 bit offset table. |
| protected byte[] | packChecksum
Footer checksum applied on the bottom of the pack file. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| 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). |
| private int | |
| 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 |
| private int | |
| 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
|
| private long | |
| 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. |
| private static int | |
| 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. |
| crc32 | back to summary |
|---|---|
| private byte[][] crc32 256 arrays of the CRC-32 of objects, matching | |
| FANOUT | back to summary |
|---|---|
| private static final int FANOUT | |
| fanoutTable | back to summary |
|---|---|
| private final long[] fanoutTable | |
| IS_O64 | back to summary |
|---|---|
| private static final long IS_O64 | |
| names | back to summary |
|---|---|
| pack-priv int[][] names 256 arrays of contiguous object names. | |
| NO_BYTES | back to summary |
|---|---|
| private static final byte[] NO_BYTES | |
| NO_INTS | back to summary |
|---|---|
| private static final int[] NO_INTS | |
| objectCnt | back to summary |
|---|---|
| private long objectCnt | |
| offset32 | back to summary |
|---|---|
| pack-priv byte[][] offset32 256 arrays of the 32 bit offset data, matching | |
| offset64 | back to summary |
|---|---|
| pack-priv byte[] offset64 64 bit offset table. | |
| packChecksum | back to summary |
|---|---|
| protected byte[] packChecksum Footer checksum applied on the bottom of the pack file. | |
| PackIndexV2 | back to summary |
|---|---|
| pack-priv PackIndexV2(final InputStream fd) throws IOException | |
| binarySearchLevelTwo | back to summary |
|---|---|
| private int binarySearchLevelTwo(AnyObjectId objId, int levelOne) | |
| 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).
| |
| findLevelOne | back to summary |
|---|---|
| private int findLevelOne(long nthPosition) | |
| 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
| |
| getLevelTwo | back to summary |
|---|---|
| private int getLevelTwo(long nthPosition, int levelOne) | |
| 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
| |
| getOffset | back to summary |
|---|---|
| private long getOffset(int levelOne, int levelTwo) | |
| 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.
| |
| idOffset | back to summary |
|---|---|
| private static int idOffset(int p) | |
| 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 int | |
| private int | |
| private final PackIndexV2 |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected void | readNext()
Implements abstract org. Used by subclasses to load the next entry into the MutableEntry. |
| levelOne | back to summary |
|---|---|
| private int levelOne | |
| levelTwo | back to summary |
|---|---|
| private int levelTwo | |
| packIndex | back to summary |
|---|---|
| private final PackIndexV2 packIndex | |
| EntriesIteratorV2 | back to summary |
|---|---|
| private EntriesIteratorV2(PackIndexV2 packIndex) | |
| 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
| |