Class DfsReaderOptions
java.lang.Object
org.eclipse.jgit.internal.storage.dfs.DfsReaderOptions
Options controlling how objects are read from a DFS stored repository.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intstatic final int1024 (number of bytes in one kibibyte/kilobyte)static final int1024KiB(number of bytes in one mebibyte/megabyte)private intprivate int -
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.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.
-
Field Details
-
KiB
public static final int KiB1024 (number of bytes in one kibibyte/kilobyte)- See Also:
-
MiB
-
deltaBaseCacheLimit
private int deltaBaseCacheLimit -
streamFileThreshold
private int streamFileThreshold -
streamPackBufferSize
private int streamPackBufferSize
-
-
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
-
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
-