com.aragost.javahg
Class RepositoryConfiguration

java.lang.Object
  extended by com.aragost.javahg.RepositoryConfiguration

public class RepositoryConfiguration
extends Object

Settings for repository and underlying server process


Nested Class Summary
static class RepositoryConfiguration.CachePolicy
           
 
Field Summary
static RepositoryConfiguration DEFAULT
          The default configuration, used in case no explicit configuration is given to a Repository
protected static Charset DEFAULT_ENCODING
          The default encoding for the repository
 
Constructor Summary
RepositoryConfiguration()
           
 
Method Summary
 void addExtension(Class<? extends MercurialExtension> extClass)
           
 RepositoryConfiguration.CachePolicy getCachePolicy()
           
 CodingErrorAction getCodingErrorAction()
           
 int getCommandWaitTimeout()
           
 int getConcurrency()
           
 Charset getEncoding()
           
 Map<String,String> getEnvironment()
           
 Collection<Class<? extends MercurialExtension>> getExtensionClasses()
           
 String getHgBin()
           
 String getHgrcPath()
           
 int getServerIdleTime()
          After a command server is idle for this many seconds the server pool may stop it.
 String getSshBin()
          Returns the custom SSH executable which should be used by Mercurial.
 int getStderrBufferSize()
           
 boolean isEnablePendingChangesets()
           
 void removeExtension(Class<? extends MercurialExtension> extClass)
           
 void setCachePolicy(RepositoryConfiguration.CachePolicy cachePolicy)
           
 void setCodingErrorAction(CodingErrorAction codingErrorAction)
           
 void setCommandWaitTimeout(int seconds)
          Set the maximum number of seconds to wait for a command server instance to become available.
 void setConcurrency(int concurrency)
          The maximum number of command server processes to use.
 void setEnablePendingChangesets(boolean enablePendingChangesets)
           
 void setEncoding(Charset encoding)
           
 void setExtensionClasses(Collection<Class<? extends MercurialExtension>> extensionClasses)
           
 void setHgBin(String hgBin)
           
 void setHgrcPath(String hgrcPath)
           
 void setServerIdleTime(int seconds)
          After a command server is idle for this many seconds the server pool may stop it.
 void setSshBin(String sshBin)
          Sets the custom SSH executable which should be used by Mercurial.
 void setStderrBufferSize(int stderrBufferSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENCODING

protected static final Charset DEFAULT_ENCODING
The default encoding for the repository


DEFAULT

public static final RepositoryConfiguration DEFAULT
The default configuration, used in case no explicit configuration is given to a Repository

Constructor Detail

RepositoryConfiguration

public RepositoryConfiguration()
Method Detail

isEnablePendingChangesets

public boolean isEnablePendingChangesets()

setEnablePendingChangesets

public void setEnablePendingChangesets(boolean enablePendingChangesets)

getHgBin

public String getHgBin()

setHgBin

public void setHgBin(String hgBin)

getHgrcPath

public String getHgrcPath()

setHgrcPath

public void setHgrcPath(String hgrcPath)

getCachePolicy

public RepositoryConfiguration.CachePolicy getCachePolicy()

setCachePolicy

public void setCachePolicy(RepositoryConfiguration.CachePolicy cachePolicy)

getCodingErrorAction

public CodingErrorAction getCodingErrorAction()

setCodingErrorAction

public void setCodingErrorAction(CodingErrorAction codingErrorAction)

getStderrBufferSize

public int getStderrBufferSize()

setStderrBufferSize

public void setStderrBufferSize(int stderrBufferSize)

getExtensionClasses

public Collection<Class<? extends MercurialExtension>> getExtensionClasses()

setExtensionClasses

public void setExtensionClasses(Collection<Class<? extends MercurialExtension>> extensionClasses)

addExtension

public void addExtension(Class<? extends MercurialExtension> extClass)

removeExtension

public void removeExtension(Class<? extends MercurialExtension> extClass)

getEncoding

public Charset getEncoding()

setEncoding

public void setEncoding(Charset encoding)

getConcurrency

public int getConcurrency()
Returns:
The maximum number of command server processes to use. Default is 1.

setConcurrency

public void setConcurrency(int concurrency)
The maximum number of command server processes to use. Default is 1.

Parameters:
concurrency - The maximum number of command server processes to use.

getCommandWaitTimeout

public int getCommandWaitTimeout()
Returns:
The maximum number of seconds to wait for a command server instance to become available. Default is 2 minutes.

setCommandWaitTimeout

public void setCommandWaitTimeout(int seconds)
Set the maximum number of seconds to wait for a command server instance to become available. Default is 2 minutes. Note: this is not command execution timeout.

Parameters:
seconds - The amount of time to wait for a server to become available in seconds.

getServerIdleTime

public int getServerIdleTime()
After a command server is idle for this many seconds the server pool may stop it. Default is Integer.MAX_VALUE.

Returns:
The idle time for a server

setServerIdleTime

public void setServerIdleTime(int seconds)
After a command server is idle for this many seconds the server pool may stop it. Default is Integer.MAX_VALUE.

Parameters:
seconds - The idle time for a server

getSshBin

public String getSshBin()
Returns the custom SSH executable which should be used by Mercurial.

Returns:
the custom SSH executable

setSshBin

public void setSshBin(String sshBin)
Sets the custom SSH executable which should be used by Mercurial.

Parameters:
sshBin - the custom SSH executable

getEnvironment

public Map<String,String> getEnvironment()
Returns:
A map of custom environment variables that will be set when command servers are started.


Copyright © 2011-2013 aragost Trifork ag. All Rights Reserved.