protected static class JobManager.ThrottleLimit extends java.lang.Object implements ILimitChecker
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,IRepositoryConnector> |
activeConnections |
protected java.util.List<DocumentDescription> |
blockingDocumentArray |
protected java.util.Map<java.lang.String,JobManager.ThrottleJobItem> |
connectionMap |
protected int |
documentsProcessed |
protected java.util.Map<java.lang.Long,java.lang.String> |
jobConnection |
protected java.util.Map<java.lang.Long,JobManager.QueueHashItem> |
jobQueueHash |
protected java.util.Map<java.lang.String,JobManager.MutableInteger> |
maxConnectionCounts |
protected int |
maxSetSize |
protected int |
n |
protected java.util.Map<java.lang.String,java.lang.Integer> |
setSizes |
_rcsid
Constructor and Description |
---|
ThrottleLimit(int n)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnectionName(java.lang.String connectionName,
IRepositoryConnector connectorInstance)
Add an active connection.
|
void |
addJob(java.lang.Long jobID,
java.lang.String connectionName)
Add a job/connection name map entry.
|
void |
addLimit(java.lang.String connectionName,
java.lang.String regexp,
int upperLimit)
Add a document limit for a specified connection.
|
boolean |
checkContinue()
See if we should examine another row.
|
boolean |
checkInclude(IResultRow row)
See if a result row should be included in the final result set.
|
boolean |
doesCompareWork()
See if this class can be legitimately compared against another of
the same type.
|
ILimitChecker |
duplicate()
Create a duplicate of this class instance.
|
boolean |
equals(java.lang.Object object)
Compare two objects and see if equal.
|
int |
getRemainingDocuments()
Get the remaining documents we should query for.
|
int |
hashCode()
Find the hashcode for this class.
|
JobManager.ThrottleLimit |
makeDeepCopy()
Make a deep copy
|
void |
setConnectionLimit(java.lang.String connectionName,
int maxDocuments)
Set a connection-based total document limit.
|
void |
tallyBlockingDocuments(BlockingDocuments blockingDocuments)
Transfer blocking documents discovered to BlockingDocuments object
|
protected java.util.Map<java.lang.String,JobManager.ThrottleJobItem> connectionMap
protected final int n
protected final java.util.Map<java.lang.Long,JobManager.QueueHashItem> jobQueueHash
protected java.util.Map<java.lang.Long,java.lang.String> jobConnection
protected java.util.Map<java.lang.String,IRepositoryConnector> activeConnections
protected java.util.Map<java.lang.String,java.lang.Integer> setSizes
protected java.util.Map<java.lang.String,JobManager.MutableInteger> maxConnectionCounts
protected int maxSetSize
protected int documentsProcessed
protected final java.util.List<DocumentDescription> blockingDocumentArray
public ThrottleLimit(int n)
n
- is the maximum number of full job descriptions we want at this time.public void tallyBlockingDocuments(BlockingDocuments blockingDocuments)
public void addJob(java.lang.Long jobID, java.lang.String connectionName)
jobID
- is the job id.connectionName
- is the connection name.public void addConnectionName(java.lang.String connectionName, IRepositoryConnector connectorInstance) throws ManifoldCFException
connectionName
- is the connection name.ManifoldCFException
public void addLimit(java.lang.String connectionName, java.lang.String regexp, int upperLimit)
connectionName
- is the connection name.regexp
- is the regular expression, which we will match against various bins.upperLimit
- is the maximum count associated with the specified job.public void setConnectionLimit(java.lang.String connectionName, int maxDocuments)
public boolean doesCompareWork()
doesCompareWork
in interface ILimitChecker
public ILimitChecker duplicate()
duplicate
in interface ILimitChecker
public JobManager.ThrottleLimit makeDeepCopy()
public int hashCode()
hashCode
in interface ILimitChecker
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in interface ILimitChecker
equals
in class java.lang.Object
object
- is the object to compare against.public int getRemainingDocuments()
public boolean checkInclude(IResultRow row) throws ManifoldCFException
checkInclude
in interface ILimitChecker
row
- is the result row to check.ManifoldCFException
public boolean checkContinue() throws ManifoldCFException
checkContinue
in interface ILimitChecker
ManifoldCFException