|
GridGain 2.0.3
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridgain.grid.spi.loadbalancing.adaptive.GridAdaptiveJobCountLoadProbe
public class GridAdaptiveJobCountLoadProbe
Implementation of node load probing based on active and waiting job count.
Based on GridAdaptiveJobCountLoadProbe.setUseAverage(boolean) parameter, this implementation will
either use average job count values or current (default is to use averages).
The load of a node is simply calculated by adding active and waiting job counts.
Below is an example of how CPU load probe would be configured in GridGain Spring configuration file:
<property name="loadBalancingSpi">
<bean class="org.gridgain.grid.spi.loadbalancing.adaptive.GridAdaptiveLoadBalancingSpi">
<property name="loadProbe">
<bean class="org.gridgain.grid.spi.loadbalancing.adaptive.GridAdaptiveJobCountLoadProbe">
<property name="useAverage" value="true"/>
</bean>
</property>
</bean>
</property>
Documentation
Email Support
Online Forums
Issue Tracking
Author: 2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.0.3

| Constructor Summary | |
|---|---|
GridAdaptiveJobCountLoadProbe()
Initializes active job probe. |
|
GridAdaptiveJobCountLoadProbe(boolean useAvg)
Creates new active job prove specifying whether to use average job counts vs. current. |
|
| Method Summary | |
|---|---|
double |
getLoad(GridNode node,
int jobsSentSinceLastUpdate)
Calculates load value for a given node. |
boolean |
isUseAverage()
Gets flag indicating whether to use average job counts vs. current. |
void |
setUseAverage(boolean useAvg)
Sets flag indicating whether to use average job counts vs. current. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GridAdaptiveJobCountLoadProbe()
public GridAdaptiveJobCountLoadProbe(boolean useAvg)
useAvg - Flag indicating whether to use average job counts vs. current.| Method Detail |
|---|
public boolean isUseAverage()
public void setUseAverage(boolean useAvg)
useAvg - Flag indicating whether to use average job counts vs. current.
public double getLoad(GridNode node,
int jobsSentSinceLastUpdate)
GridNode.getMetrics() method. For example, load can be calculated
based on job execution time or number of active jobs, or CPU/Heap utilization.
Note that if GridAdaptiveLoadProbe.getLoad(GridNode, int) returns a value of 0,
then implementation will assume that load value is simply not available and
will try to calculate an average of load values for other nodes. If such
average cannot be obtained (all node load values are 0), then a value
of 1 will be used.
getLoad in interface GridAdaptiveLoadProbenode - Grid node to calculate load for.jobsSentSinceLastUpdate - Number of jobs sent to this node since
last metrics update. This parameter may be useful when
implementation takes into account the current job count on a node.
public String toString()
toString in class Object
|
GridGain 2.0.3
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Grid Computing Made Simple, ver. 2.0.3.20052008
2005-2008 Copyright © GridGain Systems. All Rights Reserved. |
|