|
GridGain 2.1.0
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Apache20LicenseCompatible public interface GridDeploymentSpi
Grid deployment SPI is in charge of deploying tasks and classes from different sources.
Class loaders that are in charge of loading task classes (and other classes)
can be deployed directly by calling GridDeploymentSpi.register(ClassLoader, Class)} method or
by SPI itself, for example by asynchronously scanning some folder for new tasks.
When method GridDeploymentSpi.findResource(String) is called by the system, SPI must return a
class loader associated with given class. Every time a class loader
gets (re)deployed or released, callbacks
GridDeploymentListener.onUnregistered(ClassLoader)} must be called by SPI.
If peer class loading is enabled (which is default behavior, see
GridConfiguration.isPeerClassLoadingEnabled()), then it is usually
enough to deploy class loader only on one grid node. Once a task starts executing
on the grid, all other nodes will automatically load all task classes from
the node that initiated the execution. Hot redeployment is also supported
with peer class loading. Every time a task changes and gets redeployed on a
node, all other nodes will detect it and will redeploy this task as well.
Note that peer class loading comes into effect only if a task was
not locally deployed, otherwise, preference will always be given to
local deployment.
Gridgain provides the following GridDeploymentSpi implementations:
Documentation
Email Support
Online Forums
Issue Tracking
Author: 2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.1.0

| Method Summary | |
|---|---|
GridDeploymentResource |
findResource(String rsrcName)
Finds class loader for the given class. |
boolean |
register(ClassLoader ldr,
Class<?> rsrc)
Registers a class loader with this SPI. |
void |
setListener(GridDeploymentListener lsnr)
Sets deployment event listener. |
boolean |
unregister(String rsrcName)
Unregisters all class loaders that have a class with given name or have a class with give GridTaskName value. |
| Methods inherited from interface org.gridgain.grid.spi.GridSpi |
|---|
getName, getNodeAttributes, onContextDestroyed, onContextInitialized, spiStart, spiStop |
| Method Detail |
|---|
GridDeploymentResource findResource(String rsrcName)
rsrcName - Class name or class alias to find class loader for.
boolean register(ClassLoader ldr,
Class<?> rsrc)
throws GridSpiException
The array of classes passed in should be checked for presence of
GridTaskName annotations. The classes that have this annotation
should be accessible by this name from GridDeploymentSpi.findResource(String) method.
GridSpiException - If registration failed.ldr - Class loader to register.rsrc - Class that should be checked for aliases.
Currently the only alias in the system is GridTaskName for
task classes; in future, there may be others.
boolean unregister(String rsrcName)
GridTaskName value.
rsrcName - Either class name or GridTaskName value for a class
whose class loader needs to be unregistered.
void setListener(GridDeploymentListener lsnr)
lsnr - Listener for deployment events.
|
GridGain 2.1.0
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Grid Computing Made Simple, ver. 2.1.0.19122008
2005-2008 Copyright © GridGain Systems. All Rights Reserved. |
|
|