| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final Object | activeLock
For managing open/close accounting of |
| private int | |
| private Optionally | |
| private volatile PackFile | |
| private volatile LongList | corruptObjects
Objects we have tried to read, and discovered to be corrupt. |
| private RandomAccessFile | |
| private PackFileSnapshot | |
| pack-priv final int | |
| private volatile boolean | |
| private volatile Exception | |
| private PackFile | |
| pack-priv long | |
| private Optionally | |
| private static final Logger | |
| private byte[] | |
| private final PackFile | |
| pack-priv Instant | |
| private final Object | |
| private Optionally | |
| public static final Comparator | SORT
Sorts PackFiles to be most recently created to least recently created. |
| private AtomicInteger | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| pack-priv boolean | |
| public static void | |
| public void | |
| private synchronized void | |
| pack-priv final void | |
| private void | |
| pack-priv void | |
| private final byte[] | |
| private void | |
| private void | |
| private void | |
| pack-priv boolean | |
| private long | |
| private long | |
| pack-priv ObjectId | Returns: object id for this offset, or null if no object was foundstart offset of object to find offset)Search for object id with the specified start offset in associated pack (reverse) index. |
| pack-priv ObjectLoader | Returns: the object loader for the requested object if it is contained in this pack; null if the object was not found.temporary working space associated with the calling thread. curs, AnyObjectId the object to obtain from the pack. Must not be null. id)Get an object from this pack. |
| pack-priv synchronized PackBitmapIndex | |
| pack-priv byte[] | |
| pack-priv PackFileSnapshot | Returns: the packfile @FileSnapshot that the object is loaded from.Return the @ |
| public PackIndex | |
| pack-priv long | Returns: number of objects in index of this pack, likewise in this packObtain the total number of objects available in this pack. |
| pack-priv long | |
| pack-priv long | |
| pack-priv int | |
| pack-priv AnyObjectId | |
| public PackFile | Returns: the File object which locates this pack on disk.Get the File object which locates this pack on disk. |
| public String | Returns: name extracted frompack-*.pack pattern.Get name extracted from |
| private synchronized PackReverseIndex | |
| public boolean | Returns: true if the object is in this pack; false otherwise.the object to look for. Must not be null. id)Determine if an object is contained within the pack file. |
| private synchronized PackIndex | |
| pack-priv int | |
| pack-priv boolean | |
| private boolean | |
| public Iterator | |
| pack-priv ObjectLoader | |
| pack-priv ByteWindow | |
| private void | |
| private void | |
| private <T> Optionally | |
| pack-priv ByteArrayWindow | |
| private void | readFully(final long position, final byte[] dstbuf, int dstoff, final int cnt, final WindowCursor curs)
|
| pack-priv LocalObjectRepresentation | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| private void | |
| pack-priv void | |
| public boolean | Returns: true if a .keep file exist.Determines whether a .keep file exists for this pack file. |
| public String |
| activeCopyRawData | back to summary |
|---|---|
| private int activeCopyRawData | |
| activeLock | back to summary |
|---|---|
| private final Object activeLock For managing open/close accounting of | |
| activeWindows | back to summary |
|---|---|
| private int activeWindows | |
| bitmapIdx | back to summary |
|---|---|
| private Optionally<PackBitmapIndex> bitmapIdx | |
| bitmapIdxFile | back to summary |
|---|---|
| private volatile PackFile bitmapIdxFile
| |
| corruptObjects | back to summary |
|---|---|
| private volatile LongList corruptObjects Objects we have tried to read, and discovered to be corrupt. The list is allocated after the first corruption is found, and filled in as more entries are discovered. Typically this list is never used, as pack files do not usually contain corrupt objects. | |
| fd | back to summary |
|---|---|
| private RandomAccessFile fd | |
| fileSnapshot | back to summary |
|---|---|
| private PackFileSnapshot fileSnapshot | |
| hash | back to summary |
|---|---|
| pack-priv final int hash | |
| invalid | back to summary |
|---|---|
| private volatile boolean invalid | |
| invalidatingCause | back to summary |
|---|---|
| private volatile Exception invalidatingCause | |
| keepFile | back to summary |
|---|---|
| private PackFile keepFile | |
| length | back to summary |
|---|---|
| pack-priv long length | |
| loadedIdx | back to summary |
|---|---|
| private Optionally<PackIndex> loadedIdx | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| packChecksum | back to summary |
|---|---|
| private byte[] packChecksum | |
| packFile | back to summary |
|---|---|
| private final PackFile packFile | |
| packLastModified | back to summary |
|---|---|
| pack-priv Instant packLastModified | |
| readLock | back to summary |
|---|---|
| private final Object readLock Serializes reads performed against | |
| reverseIdx | back to summary |
|---|---|
| private Optionally<PackReverseIndex> reverseIdx | |
| SORT | back to summary |
|---|---|
| public static final Comparator<Pack> SORT Sorts PackFiles to be most recently created to least recently created. | |
| transientErrorCount | back to summary |
|---|---|
| private AtomicInteger transientErrorCount | |
| useStrongRefs | back to summary |
|---|---|
| private boolean useStrongRefs | |
| Pack | back to summary |
|---|---|
| public Pack(Config cfg, File packFile, PackFile bitmapIdxFile) Construct a reader for an existing, pre-indexed packfile. | |
| beginCopyAsIs | back to summary |
|---|---|
| private void beginCopyAsIs() throws StoredObjectRepresentationNotAvailableException | |
| beginWindowCache | back to summary |
|---|---|
| pack-priv boolean beginWindowCache() throws IOException | |
| close | back to summary |
|---|---|
| public static void close(Set<Pack> packs) Close the resources utilized by these pack files | |
| close | back to summary |
|---|---|
| public void close() Close the resources utilized by this pack file | |
| closeIndices | back to summary |
|---|---|
| private synchronized void closeIndices() | |
| copyAsIs | back to summary |
|---|---|
| pack-priv final void copyAsIs(PackOutputStream out, LocalObjectToPack src, boolean validate, WindowCursor curs) throws IOException, StoredObjectRepresentationNotAvailableException | |
| copyAsIs2 | back to summary |
|---|---|
| private void copyAsIs2(PackOutputStream out, LocalObjectToPack src, boolean validate, WindowCursor curs) throws IOException, StoredObjectRepresentationNotAvailableException | |
| copyPackAsIs | back to summary |
|---|---|
| pack-priv void copyPackAsIs(PackOutputStream out, WindowCursor curs) throws IOException | |
| decompress | back to summary |
|---|---|
| private final byte[] decompress(final long position, final int sz, final WindowCursor curs) throws IOException, DataFormatException | |
| doClose | back to summary |
|---|---|
| private void doClose() | |
| doOpen | back to summary |
|---|---|
| private void doOpen() throws IOException | |
| endCopyAsIs | back to summary |
|---|---|
| private void endCopyAsIs() | |
| endWindowCache | back to summary |
|---|---|
| pack-priv boolean endWindowCache() | |
| findDeltaBase | back to summary |
|---|---|
| private long findDeltaBase(ObjectId baseId) throws IOException, MissingObjectException | |
| findEndOffset | back to summary |
|---|---|
| private long findEndOffset(long startOffset) throws IOException, CorruptObjectException | |
| findObjectForOffset | back to summary |
|---|---|
| pack-priv ObjectId findObjectForOffset(long offset) throws IOException Search for object id with the specified start offset in associated pack (reverse) index.
| |
| get | back to summary |
|---|---|
| pack-priv ObjectLoader get(WindowCursor curs, AnyObjectId id) throws IOException Get an object from this pack.
| |
| getBitmapIndex | back to summary |
|---|---|
| pack-priv synchronized PackBitmapIndex getBitmapIndex() throws IOException | |
| getDeltaHeader | back to summary |
|---|---|
| pack-priv byte[] getDeltaHeader(WindowCursor wc, long pos) throws IOException, DataFormatException | |
| getFileSnapshot | back to summary |
|---|---|
| pack-priv PackFileSnapshot getFileSnapshot() Return the @
| |
| getIndex | back to summary |
|---|---|
| public PackIndex getIndex() throws IOException Get the index for this pack file.
| |
| getObjectCount | back to summary |
|---|---|
| pack-priv long getObjectCount() throws IOException Obtain the total number of objects available in this pack. This method relies on pack index, giving number of effectively available objects.
| |
| getObjectSize | back to summary |
|---|---|
| pack-priv long getObjectSize(WindowCursor curs, AnyObjectId id) throws IOException | |
| getObjectSize | back to summary |
|---|---|
| pack-priv long getObjectSize(WindowCursor curs, long pos) throws IOException | |
| getObjectType | back to summary |
|---|---|
| pack-priv int getObjectType(WindowCursor curs, long pos) throws IOException | |
| getPackChecksum | back to summary |
|---|---|
| pack-priv AnyObjectId getPackChecksum() | |
| getPackFile | back to summary |
|---|---|
| public PackFile getPackFile() Get the File object which locates this pack on disk.
| |
| getPackName | back to summary |
|---|---|
| public String getPackName() Get name extracted from
| |
| getReverseIdx | back to summary |
|---|---|
| private synchronized PackReverseIndex getReverseIdx() throws IOException | |
| hasObject | back to summary |
|---|---|
| public boolean hasObject(AnyObjectId id) throws IOException Determine if an object is contained within the pack file. For performance reasons only the index file is searched; the main pack content is ignored entirely.
| |
| idx | back to summary |
|---|---|
| private synchronized PackIndex idx() throws IOException | |
| incrementTransientErrorCount | back to summary |
|---|---|
| pack-priv int incrementTransientErrorCount() | |
| invalid | back to summary |
|---|---|
| pack-priv boolean invalid() | |
| isCorrupt | back to summary |
|---|---|
| private boolean isCorrupt(long offset) | |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type Provide iterator over entries in associated pack index, that should also exist in this pack file. Objects returned by such iterator are mutable during iteration. Iterator returns objects in SHA-1 lexicographical order.
| |
| load | back to summary |
|---|---|
| pack-priv ObjectLoader load(WindowCursor curs, long pos) throws IOException, LargeObjectException | |
| mmap | back to summary |
|---|---|
| pack-priv ByteWindow mmap(long pos, int size) throws IOException | |
| onOpenPack | back to summary |
|---|---|
| private void onOpenPack() throws IOException | |
| openFail | back to summary |
|---|---|
| private void openFail(Exception cause) | |
| optionally | back to summary |
|---|---|
| private <T> Optionally | |
| read | back to summary |
|---|---|
| pack-priv ByteArrayWindow read(long pos, int size) throws IOException | |
| readFully | back to summary |
|---|---|
| private void readFully(final long position, final byte[] dstbuf, int dstoff, final int cnt, final WindowCursor curs) throws IOException | |
| representation | back to summary |
|---|---|
| pack-priv LocalObjectRepresentation representation(final WindowCursor curs, final AnyObjectId objectId) throws IOException | |
| resetTransientErrorCount | back to summary |
|---|---|
| pack-priv void resetTransientErrorCount() | |
| resolve | back to summary |
|---|---|
| pack-priv void resolve(Set<ObjectId> matches, AbbreviatedObjectId id, int matchLimit) throws IOException | |
| setBitmapIndexFile | back to summary |
|---|---|
| pack-priv void setBitmapIndexFile(PackFile bitmapIndexFile) | |
| setCorrupt | back to summary |
|---|---|
| private void setCorrupt(long offset) | |
| setInvalid | back to summary |
|---|---|
| pack-priv void setInvalid() | |
| shouldBeKept | back to summary |
|---|---|
| public boolean shouldBeKept() Determines whether a .keep file exists for this pack file.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final long | basePos
Offset of the base object this delta applies onto. |
| pack-priv final long | deltaPos
Offset of the delta object. |
| pack-priv final int | deltaSize
Size of the inflated delta stream. |
| pack-priv final int | hdrLen
Total size of the delta's pack entry header (including base). |
| pack-priv final Pack. | next
Child that applies onto this object. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| basePos | back to summary |
|---|---|
| pack-priv final long basePos Offset of the base object this delta applies onto. | |
| deltaPos | back to summary |
|---|---|
| pack-priv final long deltaPos Offset of the delta object. | |
| deltaSize | back to summary |
|---|---|
| pack-priv final int deltaSize Size of the inflated delta stream. | |
| hdrLen | back to summary |
|---|---|
| pack-priv final int hdrLen Total size of the delta's pack entry header (including base). | |
| next | back to summary |
|---|---|
| pack-priv final Pack. Child that applies onto this object. | |
| Delta | back to summary |
|---|---|
| pack-priv Delta(Pack. | |