|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConcurrencyThrottle
Contains a set of ConcurrencyConstraint objects, which control the number of jobs that are allowed to execute at the same time.
Method Summary | |
---|---|
void |
add(ConcurrencyConstraint concurrencyConstraint)
Adds a new concurrency constraint to this concurrency throttle. |
ConcurrencyConstraint |
add(int limit)
Adds a new concurrency constraint to this concurrency throttle. |
ConcurrencyConstraint |
add(java.lang.String concurrencyConstraint)
Sets the concurrency throttle for this node. |
void |
clear()
Deletes all concurrency constraints from this concurrency throttle. |
java.lang.Object |
clone()
Returns a deep copy of this ConcurrencyThrottle object. |
boolean |
contains(ConcurrencyConstraint concurrencyConstraint)
Indicates whether the specified concurrency constraint exists in this concurrency throttle. |
java.util.Iterator |
iterator()
Returns all concurrency constraints in this concurrency throttle. |
boolean |
remove(ConcurrencyConstraint concurrencyConstraint)
Deletes the specified concurrency constraint from this concurrency throttle. |
int |
size()
Returns the number of concurrency constraints in this concurrency throttle. |
java.lang.String |
toString()
Returns this concurrency throttle as a complete concurrency throttle expression, which can be used to create a new concurrency throttle. |
Method Detail |
---|
void add(ConcurrencyConstraint concurrencyConstraint)
concurrencyConstraint
- The new concurrency constraint to this
concurrency throttle.
java.lang.IllegalArgumentException
- If concurrencyConstraint is null.ConcurrencyConstraint add(int limit)
For example, a limit of 15 indicates that no more than 15 jobs can run at a time from the current branch of the job tree.
limit
- The new concurrency constraint to this concurrency throttle.
java.lang.IllegalArgumentException
- If limit is less than 0.ConcurrencyConstraint add(java.lang.String concurrencyConstraint)
For example, the concurrency throttle expression "/lightweight jobs/ <= 15" indicates that no more than 15 jobs can run at a time from the "/lightweight jobs/" branch of the job tree.
concurrencyConstraint
- The concurrency throttle for this node.
java.lang.IllegalArgumentException
- If concurrencyConstraint is null, empty,
or does not represent a valid concurrency throttle expression.void clear()
java.lang.Object clone()
boolean contains(ConcurrencyConstraint concurrencyConstraint)
concurrencyConstraint
- The concurrency constraint that is used to
check whether it exists in this concurrency throttle.
java.util.Iterator iterator()
boolean remove(ConcurrencyConstraint concurrencyConstraint)
concurrencyConstraint
- The concurrency constraint to delete.
int size()
java.lang.String toString()
For example, suppose this concurrency throttle contains the following three concurrency constraints.
/lightweights/ <= 15
/heavyweights/ <= 1
/misc/ <= 5
In the above example, the concurrency throttle is expressed as follows.
/lightweights/ <= 15 & /heavyweights/ <= 1 & /misc/ <= 5
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |