@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.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018