GridGain™ 2.1.0
Java API Specification

org.gridgain.grid.resources
Annotation Type GridExecutorServiceResource


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

Annotates a field or a setter method for injection of ExecutorService resource. ExecutorService is provided to grid via GridConfiguration.

Executor service can be injected into instances of following classes:

Here is how injection would typically happen:

 public class MyGridJob implements GridJob {
      ...
      @GridExecutorServiceResource
      private ExecutorService execSvc;
      ...
  }
 
or
 public class MyGridJob implements GridJob {
     ...
     private ExecutorService execSvc = null;
     ...
     @GridExecutorServiceResource
     public void setExecutor(GridExecutorService execSvc) {
          this.execSvc = execSvc;
     }
     ...
 }
 

See GridConfiguration.getExecutorService() for Grid configuration details.



See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

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

 


GridGain™ 2.1.0
Java API Specification

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