protected static class JobManager.ThrottleJobItem
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,JobManager.MutableInteger> |
binCounts
This is a map of the bins and their current counts.
|
protected java.util.List<JobManager.ThrottleLimitSpec> |
throttleLimits
These are the bin limits.
|
Constructor and Description |
---|
ThrottleJobItem()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addLimit(java.lang.String regexp,
int maxCount)
Add a bin limit.
|
void |
decrement(java.lang.String binName)
Decrement specified bin.
|
JobManager.ThrottleJobItem |
duplicate()
Create a duplicate of this item.
|
protected int |
findMaxCount(java.lang.String binName)
Given a bin name, find the max value for it using the regexps that are in place.
|
boolean |
isEmpty(java.lang.String binName)
Check if the specified bin is empty.
|
protected java.util.List<JobManager.ThrottleLimitSpec> throttleLimits
protected final java.util.Map<java.lang.String,JobManager.MutableInteger> binCounts
public void addLimit(java.lang.String regexp, int maxCount)
regexp
- is the regular expression describing the bins to which the limit applies to.maxCount
- is the maximum number of fetches allowed for that bin.public JobManager.ThrottleJobItem duplicate()
public boolean isEmpty(java.lang.String binName)
binName
- is the bin name.public void decrement(java.lang.String binName)
binName
- is the bin name.protected int findMaxCount(java.lang.String binName)
binName
- is the bin name.