@Documented @Retention(value=RUNTIME) @Target(value={METHOD,FIELD}) public @interface IgniteInstanceResource
Ignite
instance.
It can be injected into grid tasks and grid jobs. Note that grid instance will
not be injected into SPI's, as there is no grid during SPI start.
Grid instance can be injected into instances of following classes:
ComputeTask
ComputeJob
LifecycleBean
Here is how injection would typically happen:
public class MyIgniteJob implements ComputeJob { ... @IgniteInstanceResource private Ignite ignite; ... }or
public class MyIgniteJob implements ComputeJob { ... private Ignite ignite; ... @IgniteInstanceResource public void setIgnite(Ignite ignite) { this.ignite = ignite; } ... }
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019