org.eclipse.jgit.storage.dfs
Class DfsReaderOptions

java.lang.Object
  extended by org.eclipse.jgit.storage.dfs.DfsReaderOptions

public class DfsReaderOptions
extends Object

Options controlling how objects are read from a DHT stored repository.


Field Summary
static int KiB
          1024 (number of bytes in one kibibyte/kilobyte)
static int MiB
          1024 KiB (number of bytes in one mebibyte/megabyte)
 
Constructor Summary
DfsReaderOptions()
          Create a default reader configuration.
 
Method Summary
 DfsReaderOptions fromConfig(Config rc)
          Update properties by setting fields from the configuration.
 int getDeltaBaseCacheLimit()
           
 int getStreamFileThreshold()
           
 DfsReaderOptions setDeltaBaseCacheLimit(int maxBytes)
          Set the maximum number of bytes in the DeltaBaseCache.
 DfsReaderOptions setStreamFileThreshold(int newLimit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
1024 KiB (number of bytes in one mebibyte/megabyte)

See Also:
Constant Field Values
Constructor Detail

DfsReaderOptions

public DfsReaderOptions()
Create a default reader configuration.

Method Detail

getDeltaBaseCacheLimit

public int getDeltaBaseCacheLimit()
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()
Returns:
the size threshold beyond which objects must be streamed.

setStreamFileThreshold

public DfsReaderOptions setStreamFileThreshold(int newLimit)
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 an ObjectStream.
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


Copyright © 2012. All Rights Reserved.