Class RepositoryConnection
- java.lang.Object
-
- org.apache.manifoldcf.crawler.repository.RepositoryConnection
-
- All Implemented Interfaces:
IRepositoryConnection
public class RepositoryConnection extends java.lang.Object implements IRepositoryConnection
An instance of this class represents a persistently-stored repository connection description. This is the paper object meant for editing and manipulation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classRepositoryConnection.ThrottleItemThrottle item class.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected java.lang.StringauthorityNameprotected java.lang.StringclassNameprotected ConfigParamsconfigParamsprotected java.lang.Stringdescriptionprotected booleanisNewprotected intmaxCountprotected java.lang.Stringnameprotected java.util.HashMapthrottles
-
Constructor Summary
Constructors Constructor Description RepositoryConnection()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddThrottleValue(java.lang.String match, java.lang.String description, float throttle)Add a throttle value.voidclearThrottleValues()Clear all throttle values.voiddeleteThrottleValue(java.lang.String match)Delete a throttle.RepositoryConnectionduplicate()Clone this object.java.lang.StringgetACLAuthority()Get the ACL authority name.java.lang.StringgetClassName()Get the class name.ConfigParamsgetConfigParams()Get the configuration parameters.java.lang.StringgetDescription()Get description.booleangetIsNew()Get 'isnew' condition.intgetMaxConnections()Get the maximum size of the connection pool.java.lang.StringgetName()Get name.java.lang.FloatgetThrottle()Get the maximum number of document fetches per millisecond.java.lang.StringgetThrottleDescription(java.lang.String match)Get the description for a throttle.java.lang.String[]getThrottles()Get throttles.floatgetThrottleValue(java.lang.String match)Get the throttle value for a throttle.voidsetACLAuthority(java.lang.String authorityName)Set the ACL authority name.voidsetClassName(java.lang.String className)Set the class name.voidsetDescription(java.lang.String description)Set description.voidsetIsNew(boolean isnew)Set 'isnew' condition.voidsetMaxConnections(int maxCount)Set the maximum size of the connection pool.voidsetName(java.lang.String name)Set name.voidsetThrottle(java.lang.Float rate)Set the maximum number of document fetches per millisecond.
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
isNew
protected boolean isNew
-
name
protected java.lang.String name
-
description
protected java.lang.String description
-
className
protected java.lang.String className
-
authorityName
protected java.lang.String authorityName
-
configParams
protected ConfigParams configParams
-
maxCount
protected int maxCount
-
throttles
protected java.util.HashMap throttles
-
-
Method Detail
-
duplicate
public RepositoryConnection duplicate()
Clone this object.- Returns:
- the cloned object.
-
setIsNew
public void setIsNew(boolean isnew)
Set 'isnew' condition.- Specified by:
setIsNewin interfaceIRepositoryConnection- Parameters:
isnew- true if this is a new instance.
-
getIsNew
public boolean getIsNew()
Get 'isnew' condition.- Specified by:
getIsNewin interfaceIRepositoryConnection- Returns:
- true if this is a new connection, false otherwise.
-
setName
public void setName(java.lang.String name)
Set name.- Specified by:
setNamein interfaceIRepositoryConnection- Parameters:
name- is the name.
-
getName
public java.lang.String getName()
Get name.- Specified by:
getNamein interfaceIRepositoryConnection- Returns:
- the name
-
setDescription
public void setDescription(java.lang.String description)
Set description.- Specified by:
setDescriptionin interfaceIRepositoryConnection- Parameters:
description- is the description.
-
getDescription
public java.lang.String getDescription()
Get description.- Specified by:
getDescriptionin interfaceIRepositoryConnection- Returns:
- the description
-
setClassName
public void setClassName(java.lang.String className)
Set the class name.- Specified by:
setClassNamein interfaceIRepositoryConnection- Parameters:
className- is the class name.
-
getClassName
public java.lang.String getClassName()
Get the class name.- Specified by:
getClassNamein interfaceIRepositoryConnection- Returns:
- the class name
-
setACLAuthority
public void setACLAuthority(java.lang.String authorityName)
Set the ACL authority name.- Specified by:
setACLAuthorityin interfaceIRepositoryConnection- Parameters:
authorityName- is the ACL authority name.
-
getACLAuthority
public java.lang.String getACLAuthority()
Get the ACL authority name.- Specified by:
getACLAuthorityin interfaceIRepositoryConnection- Returns:
- the ACL authority name.
-
getConfigParams
public ConfigParams getConfigParams()
Get the configuration parameters.- Specified by:
getConfigParamsin interfaceIRepositoryConnection- Returns:
- the map. Can be modified.
-
setMaxConnections
public void setMaxConnections(int maxCount)
Set the maximum size of the connection pool.- Specified by:
setMaxConnectionsin interfaceIRepositoryConnection- Parameters:
maxCount- is the maximum connection count per JVM.
-
getMaxConnections
public int getMaxConnections()
Get the maximum size of the connection pool.- Specified by:
getMaxConnectionsin interfaceIRepositoryConnection- Returns:
- the maximum size.
-
clearThrottleValues
public void clearThrottleValues()
Clear all throttle values.- Specified by:
clearThrottleValuesin interfaceIRepositoryConnection
-
addThrottleValue
public void addThrottleValue(java.lang.String match, java.lang.String description, float throttle)Add a throttle value.- Specified by:
addThrottleValuein interfaceIRepositoryConnection- Parameters:
description- is the throttle description.match- is the regexp to be applied to the bin names.throttle- is the fetch rate to use, in fetches per millisecond.
-
deleteThrottleValue
public void deleteThrottleValue(java.lang.String match)
Delete a throttle.- Specified by:
deleteThrottleValuein interfaceIRepositoryConnection- Parameters:
match- is the regexp describing the throttle to be removed.
-
getThrottles
public java.lang.String[] getThrottles()
Get throttles. This will return a list of match strings, ordered by description and then match string.- Specified by:
getThrottlesin interfaceIRepositoryConnection- Returns:
- the ordered list of throttles.
-
getThrottleDescription
public java.lang.String getThrottleDescription(java.lang.String match)
Get the description for a throttle.- Specified by:
getThrottleDescriptionin interfaceIRepositoryConnection- Parameters:
match- describes the throttle.- Returns:
- the description.
-
getThrottleValue
public float getThrottleValue(java.lang.String match)
Get the throttle value for a throttle.- Specified by:
getThrottleValuein interfaceIRepositoryConnection- Parameters:
match- describes the throttle.- Returns:
- the throttle value, in fetches per millisecond.
-
setThrottle
public void setThrottle(java.lang.Float rate)
Set the maximum number of document fetches per millisecond.- Specified by:
setThrottlein interfaceIRepositoryConnection- Parameters:
rate- is the rate, in fetches/millisecond.
-
getThrottle
public java.lang.Float getThrottle()
Get the maximum number of document fetches per millisecond.- Specified by:
getThrottlein interfaceIRepositoryConnection- Returns:
- fetches/ms, or null if there is no throttle.
-
-