CpuConstraint (Quartz Parent POM 2.0.1 API)
From Quartz Java
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
org.quartz.locality.constraint Class CpuConstraint
java.lang.Objectorg.quartz.locality.constraint.CpuConstraint
- All Implemented Interfaces:
- Serializable, Constraint<CpuConstraint.Operator,Integer>
public class CpuConstraint
- extends Object
- implements Constraint<CpuConstraint.Operator,Integer>
Cpu based constraint for best node evaluation
- Author:
- Alex Snaps
- See Also:
CpuEvaluator, Serialized Form
| Nested Class Summary | |
|---|---|
static class |
CpuConstraint.Operator
|
| Constructor Summary | |
|---|---|
CpuConstraint(CpuConstraint.Operator op,
int value)
|
|
| Method Summary | |
|---|---|
static CpuConstraint |
coresAtLeast(int amount)
Creates a constraint that requires the node to have a least an amount of core |
boolean |
equals(Object obj)
|
CpuConstraint.Operator |
getOp()
|
int |
getValue()
|
int |
hashCode()
|
static CpuConstraint |
loadAtMost(double amount)
Creates a constraint that requires the node to have at most a certain load |
boolean |
matches(Integer actual)
|
static CpuConstraint |
threadsAvailableAtLeast(int amount)
Creates a constraint that requires the node to have a least an amount of threads available |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
CpuConstraint
public CpuConstraint(CpuConstraint.Operator op, int value)
- Parameters:
op-value-
| Method Detail |
|---|
getOp
public CpuConstraint.Operator getOp()
getValue
public int getValue()
matches
public boolean matches(Integer actual)
threadsAvailableAtLeast
public static CpuConstraint threadsAvailableAtLeast(int amount)
- Creates a constraint that requires the node to have a least an
amountof threads available - Parameters:
amount- Number of threads to be available- Returns:
- The
CpuConstraint
coresAtLeast
public static CpuConstraint coresAtLeast(int amount)
- Creates a constraint that requires the node to have a least an
amountof core - Parameters:
amount- Number of cores- Returns:
- The
CpuConstraint
loadAtMost
public static CpuConstraint loadAtMost(double amount)
- Creates a constraint that requires the node to have at most a certain load
- Parameters:
amount- The maximum load the node can currently have- Returns:
- The
CpuConstraint
hashCode
public int hashCode()
equals
public boolean equals(Object obj)
toString
public String toString()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2001-2011, Terracotta, Inc.