java.lang.Object
org.eclipse.jgit.internal.storage.dfs.DfsReaderOptions
Options controlling how objects are read from a DFS stored repository.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromConfig(Config rc) Update properties by setting fields from the configuration.intGet maximum number of bytes to hold in per-reader DeltaBaseCache.intGet the size threshold beyond which objects must be streamed.intGet number of bytes to use for buffering when streaming a pack file during copying.setDeltaBaseCacheLimit(int maxBytes) Set the maximum number of bytes in the DeltaBaseCache.setLoadRevIndexInParallel(boolean loadRevIndexInParallel) Enable (or disable) parallel loading of reverse index.setStreamFileThreshold(int newLimit) Set new byte limit for objects that must be streamed.setStreamPackBufferSize(int bufsz) Set new buffer size in bytes for buffers used when streaming pack files during copying.setUseMidxBitmaps(boolean useMidxBitmaps) Set if the midx packs should use their bitmaps or fallback to bitmaps in GC pack.setUseObjectSizeIndex(boolean useObjectSizeIndex) Set if the reader should try to use the object size indexbooleanCheck if reverse index should be loaded in parallel.booleanUse bitmaps in the midx if available.booleanUse the object size index if available.
-
Field Details
-
KiB
public static final int KiB1024 (number of bytes in one kibibyte/kilobyte)- See Also:
-
MiB
public static final int MiB1024KiB(number of bytes in one mebibyte/megabyte)- See Also:
-
-
Constructor Details
-
DfsReaderOptions
public DfsReaderOptions()Create a default reader configuration.
-
-
Method Details
-
getDeltaBaseCacheLimit
public int getDeltaBaseCacheLimit()Get maximum number of bytes to hold in per-reader DeltaBaseCache.- Returns:
- maximum number of bytes to hold in per-reader DeltaBaseCache.
-
setDeltaBaseCacheLimit
Set the maximum number of bytes in the DeltaBaseCache.- Parameters:
maxBytes- the new limit.- Returns:
this
-
getStreamFileThreshold
public int getStreamFileThreshold()Get the size threshold beyond which objects must be streamed.- Returns:
- the size threshold beyond which objects must be streamed.
-
setStreamFileThreshold
Set new byte limit for objects that must be streamed.- Parameters:
newLimit- new byte limit for objects that must be streamed. Objects smaller than this size can be obtained as a contiguous byte array, while objects bigger than this size require using anObjectStream.- Returns:
this
-
getStreamPackBufferSize
public int getStreamPackBufferSize()Get number of bytes to use for buffering when streaming a pack file during copying.- Returns:
- number of bytes to use for buffering when streaming a pack file during copying. If 0 the block size of the pack is used.
-
setStreamPackBufferSize
Set new buffer size in bytes for buffers used when streaming pack files during copying.- Parameters:
bufsz- new buffer size in bytes for buffers used when streaming pack files during copying.- Returns:
this
-
shouldLoadRevIndexInParallel
public boolean shouldLoadRevIndexInParallel()Check if reverse index should be loaded in parallel.- Returns:
- true if reverse index is loaded in parallel for bitmap index.
-
setLoadRevIndexInParallel
Enable (or disable) parallel loading of reverse index.- Parameters:
loadRevIndexInParallel- whether to load reverse index in parallel.- Returns:
this
-
shouldUseObjectSizeIndex
public boolean shouldUseObjectSizeIndex()Use the object size index if available.- Returns:
- true if the reader should try to use the object size index. if false, the reader ignores that index.
-
setUseObjectSizeIndex
Set if the reader should try to use the object size index- Parameters:
useObjectSizeIndex- true to use it, false to ignore the object size index- Returns:
this
-
shouldUseMidxBitmaps
public boolean shouldUseMidxBitmaps()Use bitmaps in the midx if available.- Returns:
- true if a midx pack should use its own bitmaps. false to fallback to GC bitmaps.
-
setUseMidxBitmaps
Set if the midx packs should use their bitmaps or fallback to bitmaps in GC pack.- Parameters:
useMidxBitmaps- useMidxBitmaps to set- Returns:
this
-
fromConfig
Update properties by setting fields from the configuration.If a property is not defined in the configuration, then it is left unmodified.
- Parameters:
rc- configuration to read properties from.- Returns:
this
-