org.apache.ignite.resources

## Annotation Type LoadBalancerResource

-     @Documented
       @Retention(value=RUNTIME)
       @Target(value={METHOD,FIELD})
      public @interface LoadBalancerResource

  Annotates a field or a setter method for injection of `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:

  - `ComputeTask`

  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.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021