public class DfsBlockCacheConfig
extends java.lang.Object
DfsBlockCache
.Modifier and Type | Field and Description |
---|---|
static int |
KB
1024 (number of bytes in one kibibyte/kilobyte)
|
static int |
MB
1024
KB (number of bytes in one mebibyte/megabyte) |
Constructor and Description |
---|
DfsBlockCacheConfig()
Create a default configuration.
|
Modifier and Type | Method and Description |
---|---|
DfsBlockCacheConfig |
fromConfig(Config rc)
Update properties by setting fields from the configuration.
|
long |
getBlockLimit() |
int |
getBlockSize() |
int |
getReadAheadLimit() |
java.util.concurrent.ThreadPoolExecutor |
getReadAheadService() |
DfsBlockCacheConfig |
setBlockLimit(long newLimit) |
DfsBlockCacheConfig |
setBlockSize(int newSize) |
DfsBlockCacheConfig |
setReadAheadLimit(int newSize) |
DfsBlockCacheConfig |
setReadAheadService(java.util.concurrent.ThreadPoolExecutor svc) |
public static final int KB
public static final int MB
KB
(number of bytes in one mebibyte/megabyte)public long getBlockLimit()
public DfsBlockCacheConfig setBlockLimit(long newLimit)
newLimit
- maximum number bytes of heap memory to dedicate to caching
pack file data.this
public int getBlockSize()
public DfsBlockCacheConfig setBlockSize(int newSize)
newSize
- size in bytes of a single window read in from the pack file.this
public int getReadAheadLimit()
public DfsBlockCacheConfig setReadAheadLimit(int newSize)
newSize
- new read-ahead limit, in bytes.this
public java.util.concurrent.ThreadPoolExecutor getReadAheadService()
public DfsBlockCacheConfig setReadAheadService(java.util.concurrent.ThreadPoolExecutor svc)
svc
- service to perform read-ahead of sequential blocks with. If
not null the RejectedExecutionHandler
must be managed
by the JGit DFS library and not the application.this
.public DfsBlockCacheConfig fromConfig(Config rc)
If a property is not defined in the configuration, then it is left unmodified.
rc
- configuration to read properties from.this
Copyright © 2012. All Rights Reserved.