GridGain™ 2.0.3
Java API Specification

org.gridgain.grid.resources
Annotation Type GridLocalNodeIdResource


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

Annotates a field or a setter method for injection of local node UUID resource. Node UUID is a globally unique node identifier and is provided to grid via GridConfiguration. It can be injected into grid tasks, grid jobs, and SPI's.

Here is how injection would typically happen:

 public class MyGridJob implements GridJob {
      ...
      @GridLocalNodeIdResource
      private UUID nodeId;
      ...
  } 
 
or
 public class MyGridJob implements GridJob {
     ...
     private UUID nodeId = null;
     ...
     @GridLocalNodeIdResource
     public void setLocalNodeId(UUID nodeId) {
          this.nodeId = nodeId;
     }
     ...
 } 
 

See GridConfiguration.getNodeId() for Grid configuration details.



See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

Author:   2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.0.3

 


GridGain™ 2.0.3
Java API Specification

GridGain™ - Grid Computing Made Simple, ver. 2.0.3.20052008
2005-2008 Copyright © GridGain Systems. All Rights Reserved.