@Documented @Retention(value=RUNTIME) @Target(value={METHOD,FIELD}) public @interface GridLocalNodeIdResource
UUID resource. Node UUID
is a globally unique node identifier and is provided to grid via GridConfiguration.
Local node ID can be injected into instances of following classes:
Here is how injection would typically happen:
public class MyGridJob implements GridComputeJob {
...
@GridLocalNodeIdResource
private UUID nodeId;
...
}
or
public class MyGridJob implements GridComputeJob {
...
private UUID nodeId;
...
@GridLocalNodeIdResource
public void setLocalNodeId(UUID nodeId) {
this.nodeId = nodeId;
}
...
}
See GridConfiguration.getNodeId() for Grid configuration details.
Copyright © 2014. All rights reserved.