@Documented @Retention(value=RUNTIME) @Target(value={METHOD,FIELD}) public @interface LoadBalancerResource
ComputeLoadBalancer
.
Specific implementation for grid load balancer is defined by
LoadBalancingSpi
which is provided to grid via IgniteConfiguration
..
Load balancer can be injected into instances of following classes:
Here is how injection would typically happen:
public class MyGridTask extends ComputeTask<String, Integer> { @LoadBalancerResource private ComputeLoadBalancer balancer; }or
public class MyGridTask extends ComputeTask<String, Integer> { ... private ComputeLoadBalancer balancer; ... @LoadBalancerResource public void setBalancer(ComputeLoadBalancer balancer) { this.balancer = balancer; } ... }
See IgniteConfiguration.getLoadBalancingSpi()
for Grid configuration details.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024