java.lang.Object
org.eclipse.jgit.internal.storage.dfs.DfsPackFile
org.eclipse.jgit.internal.storage.dfs.DfsPackFileMidx
Implementation of a DfsPackfile that tries to solve the queries in a
multipack index before resorting to the real packs.
It uses the position in the multipack index of the objects as their "offset".
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.internal.storage.dfs.DfsPackFile
DfsPackFile.CachedStreamIndexFactory, DfsPackFile.CachedStreamPackIndexes, DfsPackFile.IndexFactory, DfsPackFile.PackBitmapIndexLoader -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExceptionException that caused the packfile to be flagged as invalidFields inherited from class org.eclipse.jgit.internal.storage.dfs.DfsPackFile
DEFAULT_BITMAP_LOADER, OFFSET_SORT -
Method Summary
Modifier and TypeMethodDescriptionasObjectIdSet(DfsReader ctx) Get a view of this packfile as a set of objectsintfindIdxPosition(DfsReader ctx, AnyObjectId id) All packs indexed by this multipack index and its chaingetBitmapIndex(DfsReader ctx) Get the BitmapIndex for this PackFile.getCommitGraph(DfsReader ctx) Get the Commit Graph for this PackFile.Packs indexed by this multipack index (base NOT included)Base of this multipack indexgetPackIndex(DfsReader ctx) Get the PackIndex for this PackFile.getReverseIdx(DfsReader ctx) Get the PackReverseIndex for this PackFile.booleanhasObject(DfsReader ctx, AnyObjectId id) Check if an object is stored within this pack.Methods inherited from class org.eclipse.jgit.internal.storage.dfs.DfsPackFile
getPackDescription, isIndexLoaded
-
Field Details
-
invalidatingCause
Exception that caused the packfile to be flagged as invalid
-
-
Method Details
-
getPackIndex
Description copied from class:DfsPackFileGet the PackIndex for this PackFile.- Overrides:
getPackIndexin classDfsPackFile- Parameters:
ctx- reader context to support reading from the backing store if the index is not already loaded in memory.- Returns:
- the PackIndex.
-
asObjectIdSet
Description copied from class:DfsPackFileGet a view of this packfile as a set of objectsTo use when the caller only needs to check inclusion (without specific order or getting offsets).
- Overrides:
asObjectIdSetin classDfsPackFile- Parameters:
ctx- reader context- Returns:
- a view of this packfile as a set of objects
- Throws:
IOException- cannot load the backing data from storage
-
getReverseIdx
Description copied from class:DfsPackFileGet the PackReverseIndex for this PackFile.- Overrides:
getReverseIdxin classDfsPackFile- Parameters:
ctx- reader context to support reading from the backing store if the index is not already loaded in memory- Returns:
- the PackReverseIndex
-
getBitmapIndex
Description copied from class:DfsPackFileGet the BitmapIndex for this PackFile.- Overrides:
getBitmapIndexin classDfsPackFile- Parameters:
ctx- reader context to support reading from the backing store if the index is not already loaded in memory.- Returns:
- the BitmapIndex.
- Throws:
IOException- the bitmap index is not available, or is corrupt.
-
getCommitGraph
Description copied from class:DfsPackFileGet the Commit Graph for this PackFile.- Overrides:
getCommitGraphin classDfsPackFile- Parameters:
ctx- reader context to support reading from the backing store if the index is not already loaded in memory.- Returns:
CommitGraph, null if pack doesn't have it.- Throws:
IOException- the Commit Graph is not available, or is corrupt.
-
getCoveredPacks
Packs indexed by this multipack index (base NOT included)- Returns:
- packs indexed by this multipack index
-
getAllCoveredPacks
All packs indexed by this multipack index and its chainThis does not include the inner multipack indexes themselves, only their covered packs.
- Returns:
- packs indexed by this multipack index and its parents.
-
getMultipackIndexBase
Base of this multipack indexIf this midx is part of a chain, this is its parent
- Returns:
- the base of this multipack index
-
findIdxPosition
- Throws:
IOException
-
hasObject
Description copied from class:DfsPackFileCheck if an object is stored within this pack.- Overrides:
hasObjectin classDfsPackFile- Parameters:
ctx- reader context to support reading from the backing store if the index is not already loaded in memory.id- object to be located.- Returns:
- true if the object exists in this pack; false if it does not.
- Throws:
IOException- the pack index is not available, or is corrupt.
-