Module org.eclipse.jgit
Interface DfsReader.PackLoadListener
- Enclosing class:
- DfsReader
protected static interface DfsReader.PackLoadListener
Announces when data is loaded by reader
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Immutable copy of a DFS block metadata -
Method Summary
Modifier and TypeMethodDescriptionvoid
onBlockLoad
(String packName, DfsObjDatabase.PackSource src, PackExt ext, long position, DfsReader.PackLoadListener.DfsBlockData dfsBlockData) This is called when a dfs block is loaded into the reader.void
onIndexLoad
(String packName, DfsObjDatabase.PackSource src, PackExt ext, long size, Object loadedIdx) This is called when an index reference (e.g.
-
Method Details
-
onIndexLoad
void onIndexLoad(String packName, DfsObjDatabase.PackSource src, PackExt ext, long size, Object loadedIdx) This is called when an index reference (e.g. primary index, reverse index, ...) is set in the reader, regarless if loaded from scratch or copied from cache. During the lifetime of the reader, the reference for an index should be set only once.- Parameters:
packName
- Name of the packsrc
- Source of the pack (e.g. GC, COMPACT, ...)ext
- Extension in the pack (e.g. IDX, RIDX, ...)size
- Size of the data loaded (usually as bytes in disk)loadedIdx
- reference to the loaded index
-
onBlockLoad
void onBlockLoad(String packName, DfsObjDatabase.PackSource src, PackExt ext, long position, DfsReader.PackLoadListener.DfsBlockData dfsBlockData) This is called when a dfs block is loaded into the reader. The reader keeps only one block at a time in memory, so during a request the same block could be loaded multiple times.- Parameters:
packName
- Name of the pack this block belongs tosrc
- Source of the pack (e.g. GC, COMPACT, ...)ext
- Extension in the pack (e.g. PACK or REFTABLE)position
- Offset in the file requested by callerdfsBlockData
- Metadata of the block
-