org.eclipse.jgit.storage.dht.spi.cache
Class CacheOptions

java.lang.Object
  extended by org.eclipse.jgit.storage.dht.spi.cache.CacheOptions

public class CacheOptions
extends java.lang.Object

Options to configure the cache.


Constructor Summary
CacheOptions()
          Initialize default options.
 
Method Summary
 CacheOptions fromConfig(Config rc)
          Update properties by setting fields from the configuration.
 Timeout getTimeout()
           
 int getWriteBufferSize()
           
 CacheOptions setTimeout(Timeout maxWaitTime)
          Set the default timeout to wait on long operations.
 CacheOptions setWriteBufferSize(int sizeInBytes)
          Set the maximum number of outstanding bytes in a WriteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheOptions

public CacheOptions()
Initialize default options.

Method Detail

getTimeout

public Timeout getTimeout()
Returns:
default timeout for all operations.

setTimeout

public CacheOptions setTimeout(Timeout maxWaitTime)
Set the default timeout to wait on long operations.

Parameters:
maxWaitTime - new wait time.
Returns:
this

getWriteBufferSize

public int getWriteBufferSize()
Returns:
size in bytes to buffer operations.

setWriteBufferSize

public CacheOptions setWriteBufferSize(int sizeInBytes)
Set the maximum number of outstanding bytes in a WriteBuffer.

Parameters:
sizeInBytes - maximum number of bytes.
Returns:
this

fromConfig

public CacheOptions 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 © 2011. All Rights Reserved.