org.apache.ignite.resources

## Annotation Type JobContextResource

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

  Annotates a field or a setter method for injection of `ComputeJobContext` instance. It can be injected into grid jobs only.

  Job context can be injected into instances of following classes:

  - `ComputeJob`

  Here is how injection would typically happen:

       public class MyGridJob implements ComputeJob {
            ...
            @IgniteJobContextResource
            private ComputeJobContext jobCtx;
            ...
        }

  or

       public class MyGridJob implements ComputeJob {
           ...
           private ComputeJobContext jobCtx;
           ...
           @JobContextResource
           public void setJobContext(ComputeJobContext jobCtx) {
                this.jobCtx = jobCtx;
           }
           ...
       }

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