Annotates a field or a setter method for injection of current
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:
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;
}
...
}