|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented
@Retention(value=RUNTIME)
@Target(value={METHOD,FIELD})
public @interface GridInstanceResource
Annotates a field or a setter method for injection of current Grid 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:
GridTaskGridJobGridLifecycleBeanGridLambda - includes all closures and predicates that can run on grid.@GridUserResourceHere is how injection would typically happen:
public class MyGridJob implements GridJob {
...
@GridInstanceResource
private Grid grid;
...
}
or
public class MyGridJob implements GridJob {
...
private Grid grid;
...
@GridInstanceResource
public void setGrid(Grid grid) {
this.grid = grid;
}
...
}
| Wiki | |
| Forum |

|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
|
GridGain - Real Time Big Data
|
|
|