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 class
RepositoryConnection.ThrottleItem
Throttle item class.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
protected java.lang.String
authorityName
protected java.lang.String
className
protected ConfigParams
configParams
protected java.lang.String
description
protected boolean
isNew
protected int
maxCount
protected java.lang.String
name
protected java.util.HashMap
throttles
-
Constructor Summary
Constructors Constructor Description RepositoryConnection()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addThrottleValue(java.lang.String match, java.lang.String description, float throttle)
Add a throttle value.void
clearThrottleValues()
Clear all throttle values.void
deleteThrottleValue(java.lang.String match)
Delete a throttle.RepositoryConnection
duplicate()
Clone this object.java.lang.String
getACLAuthority()
Get the ACL authority name.java.lang.String
getClassName()
Get the class name.ConfigParams
getConfigParams()
Get the configuration parameters.java.lang.String
getDescription()
Get description.boolean
getIsNew()
Get 'isnew' condition.int
getMaxConnections()
Get the maximum size of the connection pool.java.lang.String
getName()
Get name.java.lang.Float
getThrottle()
Get the maximum number of document fetches per millisecond.java.lang.String
getThrottleDescription(java.lang.String match)
Get the description for a throttle.java.lang.String[]
getThrottles()
Get throttles.float
getThrottleValue(java.lang.String match)
Get the throttle value for a throttle.void
setACLAuthority(java.lang.String authorityName)
Set the ACL authority name.void
setClassName(java.lang.String className)
Set the class name.void
setDescription(java.lang.String description)
Set description.void
setIsNew(boolean isnew)
Set 'isnew' condition.void
setMaxConnections(int maxCount)
Set the maximum size of the connection pool.void
setName(java.lang.String name)
Set name.void
setThrottle(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:
setIsNew
in interfaceIRepositoryConnection
- Parameters:
isnew
- true if this is a new instance.
-
getIsNew
public boolean getIsNew()
Get 'isnew' condition.- Specified by:
getIsNew
in interfaceIRepositoryConnection
- Returns:
- true if this is a new connection, false otherwise.
-
setName
public void setName(java.lang.String name)
Set name.- Specified by:
setName
in interfaceIRepositoryConnection
- Parameters:
name
- is the name.
-
getName
public java.lang.String getName()
Get name.- Specified by:
getName
in interfaceIRepositoryConnection
- Returns:
- the name
-
setDescription
public void setDescription(java.lang.String description)
Set description.- Specified by:
setDescription
in interfaceIRepositoryConnection
- Parameters:
description
- is the description.
-
getDescription
public java.lang.String getDescription()
Get description.- Specified by:
getDescription
in interfaceIRepositoryConnection
- Returns:
- the description
-
setClassName
public void setClassName(java.lang.String className)
Set the class name.- Specified by:
setClassName
in interfaceIRepositoryConnection
- Parameters:
className
- is the class name.
-
getClassName
public java.lang.String getClassName()
Get the class name.- Specified by:
getClassName
in interfaceIRepositoryConnection
- Returns:
- the class name
-
setACLAuthority
public void setACLAuthority(java.lang.String authorityName)
Set the ACL authority name.- Specified by:
setACLAuthority
in interfaceIRepositoryConnection
- Parameters:
authorityName
- is the ACL authority name.
-
getACLAuthority
public java.lang.String getACLAuthority()
Get the ACL authority name.- Specified by:
getACLAuthority
in interfaceIRepositoryConnection
- Returns:
- the ACL authority name.
-
getConfigParams
public ConfigParams getConfigParams()
Get the configuration parameters.- Specified by:
getConfigParams
in interfaceIRepositoryConnection
- Returns:
- the map. Can be modified.
-
setMaxConnections
public void setMaxConnections(int maxCount)
Set the maximum size of the connection pool.- Specified by:
setMaxConnections
in interfaceIRepositoryConnection
- Parameters:
maxCount
- is the maximum connection count per JVM.
-
getMaxConnections
public int getMaxConnections()
Get the maximum size of the connection pool.- Specified by:
getMaxConnections
in interfaceIRepositoryConnection
- Returns:
- the maximum size.
-
clearThrottleValues
public void clearThrottleValues()
Clear all throttle values.- Specified by:
clearThrottleValues
in interfaceIRepositoryConnection
-
addThrottleValue
public void addThrottleValue(java.lang.String match, java.lang.String description, float throttle)
Add a throttle value.- Specified by:
addThrottleValue
in 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:
deleteThrottleValue
in 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:
getThrottles
in 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:
getThrottleDescription
in 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:
getThrottleValue
in 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:
setThrottle
in 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:
getThrottle
in interfaceIRepositoryConnection
- Returns:
- fetches/ms, or null if there is no throttle.
-
-