public class ManualQueryLaningStrategy extends Object implements QueryLaningStrategy
| Constructor and Description |
|---|
ManualQueryLaningStrategy(Map<String,Integer> lanes,
Boolean isLimitPercent) |
| Modifier and Type | Method and Description |
|---|---|
<T> Optional<String> |
computeLane(QueryPlus<T> query,
Set<SegmentServerSelector> segments)
For a given
QueryPlus and set of SegmentServerSelector, compute if a query belongs to a lane
This method must be thread safe |
it.unimi.dsi.fastutil.objects.Object2IntMap<String> |
getLaneLimits(int totalLimit)
Provide a map of lane names to the limit on the number of concurrent queries for that lane
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomputeLimitFromPercentpublic it.unimi.dsi.fastutil.objects.Object2IntMap<String> getLaneLimits(int totalLimit)
QueryLaningStrategygetLaneLimits in interface QueryLaningStrategypublic <T> Optional<String> computeLane(QueryPlus<T> query, Set<SegmentServerSelector> segments)
QueryLaningStrategyQueryPlus and set of SegmentServerSelector, compute if a query belongs to a lane
This method must be thread safecomputeLane in interface QueryLaningStrategyCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.