|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.client.loadbalancer.LoadBalancer
public class LoadBalancer
This class is used to balance the number of tasks in an execution between local and remote execution. It uses the proportional bundling alogrithm, which is also used by the JPPF Driver.
AbstractProportionalBundler| Nested Class Summary | |
|---|---|
class |
LoadBalancer.ExecutionThread
Instances of this class are intended to perform local and remote task executions concurrently. |
class |
LoadBalancer.LocalExecutionThread
Instances of this class are intended to perform local task executions concurrently. |
class |
LoadBalancer.RemoteExecutionThread
Instances of this class are intended to perform remote task executions concurrently. |
| Constructor Summary | |
|---|---|
LoadBalancer()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
execute(JPPFJob job,
AbstractJPPFClientConnection connection,
boolean localJob)
Perform the execution. |
Object |
getAvailableConnectionLock()
Lock used when determining if a job can be executed immediately. |
boolean |
isLocalEnabled()
Determine whether local execution is enabled on this client. |
boolean |
isLocallyExecuting()
Determine whether this load balancer is currently executing a job locally. |
void |
setLocalEnabled(boolean localEnabled)
Specifiy whether local execution is enabled on this client. |
void |
setLocallyExecuting(boolean locallyExecuting)
Specify whether this load balancer is currently executing a job locally. |
void |
stop()
Stop this load-balancer and cleanup any resource it uses. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoadBalancer()
| Method Detail |
|---|
public void stop()
public void execute(JPPFJob job,
AbstractJPPFClientConnection connection,
boolean localJob)
throws Exception
job - the execution to perform.connection - the client connection for sending remote execution requests.localJob - determines whether the job will be executed locally, at least partially.
Exception - if an error is raised during execution.public boolean isLocalEnabled()
true if local execution is enabled, false otherwise.public void setLocalEnabled(boolean localEnabled)
localEnabled - true to enable local execution, false otherwisepublic boolean isLocallyExecuting()
true if a local job is being executed, false otherwise.public void setLocallyExecuting(boolean locallyExecuting)
locallyExecuting - true if a local job is being executed, false otherwise.public Object getAvailableConnectionLock()
Object instance.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||