public class PriorityCalculator extends java.lang.Object implements IPriorityCalculator
Modifier and Type | Class and Description |
---|---|
protected static class |
PriorityCalculator.ThrottleLimits
This class represents the throttle limits out of the connection specification
|
protected static class |
PriorityCalculator.ThrottleLimitSpec
This is a class which describes an individual throttle limit, in fetches per millisecond.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected double[] |
binCountScaleFactors |
protected java.lang.String[] |
binNames |
protected java.lang.Double |
cachedValue |
protected IRepositoryConnection |
connection |
protected java.lang.String |
documentIdentifier |
protected IReprioritizationTracker |
rt |
protected double[] |
weightedMinimumDepths |
Constructor and Description |
---|
PriorityCalculator(IReprioritizationTracker rt,
double currentMinimumDepth,
IRepositoryConnection connection,
java.lang.String[] documentBins,
java.lang.String documentIdentifier) |
PriorityCalculator(IReprioritizationTracker rt,
IRepositoryConnection connection,
java.lang.String[] documentBins,
java.lang.String documentIdentifier)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static double[] |
calculateMaxFetchRates(java.lang.String[] binNames,
IRepositoryConnection connection)
Calculate the maximum fetch rate for a given set of bins for a given connection.
|
double |
getDocumentPriority()
Calculate a document priority value.
|
void |
makePreloadRequest()
Log a preload request for this priority value.
|
public static final java.lang.String _rcsid
protected final IRepositoryConnection connection
protected final java.lang.String[] binNames
protected final java.lang.String documentIdentifier
protected final IReprioritizationTracker rt
protected final double[] binCountScaleFactors
protected final double[] weightedMinimumDepths
protected java.lang.Double cachedValue
public PriorityCalculator(IReprioritizationTracker rt, IRepositoryConnection connection, java.lang.String[] documentBins, java.lang.String documentIdentifier) throws ManifoldCFException
ManifoldCFException
public PriorityCalculator(IReprioritizationTracker rt, double currentMinimumDepth, IRepositoryConnection connection, java.lang.String[] documentBins, java.lang.String documentIdentifier) throws ManifoldCFException
ManifoldCFException
public void makePreloadRequest()
public double getDocumentPriority() throws ManifoldCFException
getDocumentPriority
in interface IPriorityCalculator
ManifoldCFException
protected static double[] calculateMaxFetchRates(java.lang.String[] binNames, IRepositoryConnection connection)