public class QueueTracker
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
QueueTracker.BinCount
This is the class which allows a mutable integer count value to be saved in the bincount table.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected java.util.Map<java.lang.String,QueueTracker.BinCount> |
activeBinCounts
These are the bin counts for active threads
|
protected static double |
binReductionFactor
Factor by which bins are reduced
|
protected PerformanceStatistics |
performanceStatistics
These are the accumulated performance averages for all connections etc.
|
protected java.util.Map<java.lang.String,QueueTracker.BinCount> |
queuedBinCounts
These are the bin counts for tracking the documents that are on
the active queue, but are not being processed yet
|
Constructor and Description |
---|
QueueTracker()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addRecord(java.lang.String[] binNames)
Add an access record to the queue tracker.
|
void |
beginProcessing(java.lang.String[] binNames)
Note that we are beginning processing for a document with a particular set of bins.
|
double |
calculateAssignmentRating(java.lang.String[] binNames,
IRepositoryConnection connection)
Calculate an assignment rating for a set of bins based on what's currently in use.
|
void |
endProcessing(java.lang.String[] binNames)
Note that we have completed processing of a document with a given set of bins.
|
PerformanceStatistics |
getCurrentStatistics()
Obtain the current performance statistics object
|
void |
noteConnectionPerformance(int docCount,
java.lang.String connectionName,
long elapsedTime)
Note the time required to successfully complete a set of documents.
|
public static final java.lang.String _rcsid
protected static final double binReductionFactor
protected final PerformanceStatistics performanceStatistics
protected final java.util.Map<java.lang.String,QueueTracker.BinCount> queuedBinCounts
protected final java.util.Map<java.lang.String,QueueTracker.BinCount> activeBinCounts
public void addRecord(java.lang.String[] binNames)
binNames
- are the set of bins, as returned from the connector in question, for
the document that is being queued. These bins are considered global in nature.public void noteConnectionPerformance(int docCount, java.lang.String connectionName, long elapsedTime)
public PerformanceStatistics getCurrentStatistics()
public void beginProcessing(java.lang.String[] binNames)
public void endProcessing(java.lang.String[] binNames)
public double calculateAssignmentRating(java.lang.String[] binNames, IRepositoryConnection connection)