|
GridGain 2.0.3
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 from different sources.
Task can be deployed directly by calling
GridDeploymentSpi.deployTask(GridDeploymentTask)} method or by SPI itself, for example
by asynchronously scanning some folder for new tasks. When method
GridDeploymentSpi.findTask(String) is called by the system, SPI must return a
deployed, but uninitialized task. 'Uninitialized' means that no grid resources
were injected into resolvers yet and resolvers were not started. Every time a
task gets redeployed or released via GridDeploymentSpi.undeployTask(String)}
method, callback GridDeploymentListener.onTaskReleased(GridDeploymentTask)}
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 a task 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 a
locally deployed task.
Gridgain provides the following GridDeploymentSpi implementations:
Documentation
Email Support
Online Forums
Issue Tracking
Author: 2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.0.3
![]() |
![]() |
| Method Summary | |
|---|---|
void |
deployTask(GridDeploymentTask task)
Explicitely deploys or re-deploys a given task. |
Map<String,GridDeploymentTask> |
findAllTasks()
Finds all tasks that have been deployed keyed by task name. |
GridDeploymentTask |
findTask(String taskName)
When underlying system needs a grid task it will attempt to deploy it on-demand by calling this method. |
void |
setListener(GridDeploymentListener listener)
Sets deployment event listener. |
void |
undeployTask(String taskName)
Un-deploys given task. |
| Methods inherited from interface org.gridgain.grid.spi.GridSpi |
|---|
getNodeAttributes, onContextDestroyed, onContextInitialized, spiStart, spiStop |
| Method Detail |
|---|
GridDeploymentTask findTask(String taskName)
Every time a task is executed on the grid, this method will be called and it is responsibility of the SPI implementation to efficiently return grid task and ensure that this task is the latest deployed instance.
Note also that many implementations would preemptively find to-be deployed tasks (if possible) and cache them so that they can return them immediately when this method is called.
taskName - Grid task name.
Map<String,GridDeploymentTask> findAllTasks()
void undeployTask(String taskName)
Every time a task is released (either via this method, or somehow differently,
based on SPI), GridDeploymentListener.onTaskReleased(GridDeploymentTask)}
callback should be called by SPI.
taskName - Grid task name.
void deployTask(GridDeploymentTask task)
throws GridSpiException
GridDeploymentSpi.findTask(String).
GridSpiException - If task is invalid.task - Task to deploy.void setListener(GridDeploymentListener listener)
listener - Listener for deployment events.
|
GridGain 2.0.3
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.0.3.20052008
2005-2008 Copyright © GridGain Systems. All Rights Reserved. |
|