Package org.apache.ignite.resources
Annotation Type LoadBalancerResource
- 
 @Documented @Retention(RUNTIME) @Target({METHOD,FIELD}) public @interface LoadBalancerResource Annotates a field or a setter method for injection ofComputeLoadBalancer. Specific implementation for grid load balancer is defined byLoadBalancingSpiwhich is provided to grid viaIgniteConfiguration..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; }orpublic 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.