Class DfsBlockCacheConfig
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheConfig
-
public class DfsBlockCacheConfig extends Object
Configuration parameters forDfsBlockCache.
-
-
Constructor Summary
Constructors Constructor Description DfsBlockCacheConfig()Create a default configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DfsBlockCacheConfigfromConfig(Config rc)Update properties by setting fields from the configuration.longgetBlockLimit()intgetBlockSize()DfsBlockCacheConfigsetBlockLimit(long newLimit)DfsBlockCacheConfigsetBlockSize(int newSize)
-
-
-
Field Detail
-
KB
public static final int KB
1024 (number of bytes in one kibibyte/kilobyte)- See Also:
- Constant Field Values
-
MB
public static final int MB
1024KB(number of bytes in one mebibyte/megabyte)- See Also:
- Constant Field Values
-
-
Method Detail
-
getBlockLimit
public long getBlockLimit()
- Returns:
- maximum number bytes of heap memory to dedicate to caching pack file data. Default is 32 MB.
-
setBlockLimit
public DfsBlockCacheConfig setBlockLimit(long newLimit)
- Parameters:
newLimit- maximum number bytes of heap memory to dedicate to caching pack file data.- Returns:
this
-
getBlockSize
public int getBlockSize()
- Returns:
- size in bytes of a single window mapped or read in from the pack file. Default is 64 KB.
-
setBlockSize
public DfsBlockCacheConfig setBlockSize(int newSize)
- Parameters:
newSize- size in bytes of a single window read in from the pack file.- Returns:
this
-
fromConfig
public DfsBlockCacheConfig 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
-
-