|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConcurrencyConstraint
Controls the number of jobs that are allowed to execute at the same time.
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a deep copy of this ConcurrencyConstraint object. |
int |
getLimit()
Returns the limit for this concurrency constraint, which indicates the maximum number of jobs that can run at the same time in the concurrency constraint's namespace. |
java.lang.String |
getNamespace()
Returns the position in the job tree to which this concurrency constraint applies. |
ConcurrencyConstraintOperator |
getOperator()
Returns the operator used to compare the number of currently executing jobs in this concurrency constraint's namespace to the maximum number of jobs that are allowed to execute in this concurrency constraint's namespace. |
void |
setLimit(int limit)
Sets the limit for this concurrency constraint, which indicates the maximum number of jobs that can run at the same time in the concurrency constraint's namespace. |
void |
setNamespace(java.lang.String namespace)
Sets the position in the job tree to which this concurrency constraint applies. |
void |
setOperator(ConcurrencyConstraintOperator operator)
Sets the operator used to compare the number of currently executing jobs in this concurrency constraint's namespace to the maximum number of jobs that are allowed to execute in this concurrency constraint's namespace. |
java.lang.String |
toString()
Returns this concurrency constraint as a string, which can be used to create a new concurrency constraint. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
java.lang.Object clone()
int getLimit()
java.lang.String getNamespace()
ConcurrencyConstraintOperator getOperator()
For example, the concurrency throttle expression "/heavyweight jobs/ <= 5" indicates that as many as 5 jobs from the /heavyweight jobs/ branch of the job tree are allowed to run at the same time.
However, the concurrency throttle expression "/heavyweight jobs/ < 5" indicates that up to but not including 5 jobs from the /heavyweight jobs/ branch of the job tree are allowed to run at the same time.
void setLimit(int limit)
limit
- The limit for this concurrency constraint.
java.lang.IllegalArgumentException
- If limit is less than 0.void setNamespace(java.lang.String namespace)
namespace
- The position in the tree of jobs to which this
concurrency constraint applies.
java.lang.IllegalArgumentException
- If namespace is null, empty, or is
invalid.void setOperator(ConcurrencyConstraintOperator operator)
For example, the concurrency throttle expression "/heavyweight jobs/ <= 5" indicates that as many as 5 jobs from the /heavyweight jobs/ branch of the job tree are allowed to run at the same time.
However, the concurrency throttle expression "/heavyweight jobs/ < 5" indicates that up to but not including 5 jobs from the /heavyweight jobs/ branch of the job tree are allowed to run at the same time.
operator
- The operator used to compare the number of currently
executing jobs in this concurrency constraint's namespace to the maximum
number of jobs that are allowed to execute in this concurrency
constraint's namespace.
java.lang.IllegalArgumentException
- If operator is null.java.lang.String toString()
For example, if this concurrency constraint's namespace is "/lightweights/", its operator is "<=", and its limit is 15, then this concurrency constraint can be expressed as the following string.
/lightweights/ <= 15
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |