- java.lang.Object
-
- org.eclipse.jgit.internal.storage.dfs.DfsReaderOptions
-
public class DfsReaderOptions extends Object
Options controlling how objects are read from a DFS stored repository.
-
-
Constructor Summary
Constructors Constructor Description DfsReaderOptions()Create a default reader configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DfsReaderOptionsfromConfig(Config rc)Update properties by setting fields from the configuration.intgetDeltaBaseCacheLimit()Get maximum number of bytes to hold in per-reader DeltaBaseCache.intgetStreamFileThreshold()Get the size threshold beyond which objects must be streamed.intgetStreamPackBufferSize()Get number of bytes to use for buffering when streaming a pack file during copying.DfsReaderOptionssetDeltaBaseCacheLimit(int maxBytes)Set the maximum number of bytes in the DeltaBaseCache.DfsReaderOptionssetLoadRevIndexInParallel(boolean loadRevIndexInParallel)Enable (or disable) parallel loading of reverse index.DfsReaderOptionssetStreamFileThreshold(int newLimit)Set new byte limit for objects that must be streamed.DfsReaderOptionssetStreamPackBufferSize(int bufsz)Set new buffer size in bytes for buffers used when streaming pack files during copying.booleanshouldLoadRevIndexInParallel()Check if reverse index should be loaded in parallel.
-
-
-
Field Detail
-
KiB
public static final int KiB
1024 (number of bytes in one kibibyte/kilobyte)- See Also:
- Constant Field Values
-
MiB
public static final int MiB
1024KiB(number of bytes in one mebibyte/megabyte)- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public DfsReaderOptions setDeltaBaseCacheLimit(int maxBytes)
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
public DfsReaderOptions setStreamFileThreshold(int newLimit)
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
public DfsReaderOptions setStreamPackBufferSize(int bufsz)
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
public DfsReaderOptions setLoadRevIndexInParallel(boolean loadRevIndexInParallel)
Enable (or disable) parallel loading of reverse index.- Parameters:
loadRevIndexInParallel- whether to load reverse index in parallel.- Returns:
this
-
fromConfig
public DfsReaderOptions fromConfig(Config rc)
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
-
-