Class DfsReftable
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.dfs.BlockBasedFile
-
- org.eclipse.jgit.internal.storage.dfs.DfsReftable
-
public class DfsReftable extends BlockBasedFile
A reftable stored inDfsBlockCache.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classDfsReftable.CacheSource
-
Field Summary
-
Fields inherited from class org.eclipse.jgit.internal.storage.dfs.BlockBasedFile
blockSize, cache, desc, ext, invalid, invalidatingCause, key, length
-
-
Constructor Summary
Constructors Constructor Description DfsReftable(DfsBlockCache cache, DfsPackDescription desc)Construct a reader for an existing reftable.DfsReftable(DfsPackDescription desc)Construct a reader for an existing reftable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DfsPackDescriptiongetPackDescription()Get description that was originally used to configure this file.ReftableReaderopen(DfsReader ctx)Open reader on the reftable.-
Methods inherited from class org.eclipse.jgit.internal.storage.dfs.BlockBasedFile
alignToBlock, blockSize, elapsedMicros, getFileName, getOrLoadBlock, invalid, read, readOneBlock, setBlockSize, setInvalid
-
-
-
-
Constructor Detail
-
DfsReftable
public DfsReftable(DfsPackDescription desc)
Construct a reader for an existing reftable.- Parameters:
desc- description of the reftable within the DFS.
-
DfsReftable
public DfsReftable(DfsBlockCache cache, DfsPackDescription desc)
Construct a reader for an existing reftable.- Parameters:
cache- cache that will store the reftable data.desc- description of the reftable within the DFS.
-
-
Method Detail
-
getPackDescription
public DfsPackDescription getPackDescription()
Get description that was originally used to configure this file.- Returns:
- description that was originally used to configure this file.
-
open
public ReftableReader open(DfsReader ctx) throws java.io.IOException
Open reader on the reftable.The returned reader is not thread safe.
- Parameters:
ctx- reader to access the DFS storage.- Returns:
- cursor to read the table; caller must close.
- Throws:
java.io.IOException- table cannot be opened.
-
-