@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 Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019