@IgniteSpiMultipleInstancesSupport(value=true) @IgniteSpiConsistencyChecked(optional=false) @IgnoreIfPeerClassLoadingDisabled public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi, LocalDeploymentSpiMBean
register(ClassLoader, Class) method. This SPI requires
no configuration.
Note that if peer class loading is enabled (which is default behavior,
see IgniteConfiguration.isPeerClassLoadingEnabled()), then it is
enough to deploy a task only on one node and all other nodes will load
required classes from the node that initiated task execution.
GridLocalDeploymentSpi
with IgniteConfiguration as it is used by default and has no
configuration parameters.DeploymentSpigridName, ignite| Constructor and Description |
|---|
LocalDeploymentSpi() |
| Modifier and Type | Method and Description |
|---|---|
DeploymentResource |
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(DeploymentListener lsnr)
Sets or unsets deployment event listener.
|
void |
spiStart(String gridName)
This method is called to start SPI.
|
void |
spiStop()
This method is called to stop SPI.
|
String |
toString() |
boolean |
unregister(String rsrcName)
Unregisters all class loaders that have a class with given name or have
a class with give
ComputeTaskName value. |
addTimeoutObject, assertParameter, checkConfigurationConsistency0, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getIgniteHome, getLocalNode, getLocalNodeId, getName, getNodeAttributes, getSpiContext, getStartTimestamp, getStartTimestampFormatted, getUpTime, getUpTimeFormatted, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, removeTimeoutObject, setName, startInfo, startStopwatch, stopInfo, unregisterMBeanclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitializedgetIgniteHome, getLocalNodeId, getName, getStartTimestamp, getStartTimestampFormatted, getUpTime, getUpTimeFormattedpublic void spiStart(@Nullable
String gridName)
throws IgniteSpiException
spiStart in interface IgniteSpigridName - Name of grid instance this SPI is being started for
(null for default grid).IgniteSpiException - Throws in case of any error during SPI start.public void spiStop()
throws IgniteSpiException
Note that this method can be called at any point including during recovery of failed start. It should make no assumptions on what state SPI will be in when this method is called.
spiStop in interface IgniteSpiIgniteSpiException - Thrown in case of any error during SPI stop.@Nullable public DeploymentResource findResource(String rsrcName)
findResource in interface DeploymentSpirsrcName - Class name or class alias to find class loader for.null if not deployed.public boolean register(ClassLoader ldr, Class<?> rsrc) throws IgniteSpiException
The array of classes passed in should be checked for presence of
ComputeTaskName annotations. The classes that have this annotation
should be accessible by this name from DeploymentSpi.findResource(String) method.
register in interface DeploymentSpildr - Class loader to register.rsrc - Class that should be checked for aliases.
Currently the only alias in the system is ComputeTaskName for
task classes; in future, there may be others.True if resource was registered.IgniteSpiException - If registration failed.public boolean unregister(String rsrcName)
ComputeTaskName value.unregister in interface DeploymentSpirsrcName - Either class name or ComputeTaskName value for a class
whose class loader needs to be unregistered.True if resource was unregistered.public void setListener(DeploymentListener lsnr)
setListener in interface DeploymentSpilsnr - Listener for deployment events. null to unset the listener.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016