public class PriorityCalculator extends 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 String |
_rcsid |
protected double[] |
binCountScaleFactors |
protected String[] |
binNames |
protected Double |
cachedValue |
protected IRepositoryConnection |
connection |
protected String |
documentIdentifier |
protected IReprioritizationTracker |
rt |
protected double[] |
weightedMinimumDepths |
Constructor and Description |
---|
PriorityCalculator(IReprioritizationTracker rt,
double currentMinimumDepth,
IRepositoryConnection connection,
String[] documentBins,
String documentIdentifier) |
PriorityCalculator(IReprioritizationTracker rt,
IRepositoryConnection connection,
String[] documentBins,
String documentIdentifier)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static double[] |
calculateMaxFetchRates(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 String _rcsid
protected final IRepositoryConnection connection
protected final String[] binNames
protected final String documentIdentifier
protected final IReprioritizationTracker rt
protected final double[] binCountScaleFactors
protected final double[] weightedMinimumDepths
protected Double cachedValue
public PriorityCalculator(IReprioritizationTracker rt, IRepositoryConnection connection, String[] documentBins, String documentIdentifier) throws ManifoldCFException
ManifoldCFException
public PriorityCalculator(IReprioritizationTracker rt, double currentMinimumDepth, IRepositoryConnection connection, String[] documentBins, String documentIdentifier) throws ManifoldCFException
ManifoldCFException
public void makePreloadRequest()
public double getDocumentPriority() throws ManifoldCFException
getDocumentPriority
in interface IPriorityCalculator
binNames
- are the global bins to which the document belongs.connection
- is the connection, from which the throttles may be obtained. More highly throttled connections are given
less favorable priority.ManifoldCFException
protected static double[] calculateMaxFetchRates(String[] binNames, IRepositoryConnection connection)