@IgniteSpiMultipleInstancesSupport(value=true) public class NeverFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, NeverFailoverSpiMBean
null out of
FailoverSpi.failover(org.apache.ignite.spi.failover.FailoverContext, List) method.
Here is a Java example on how to configure grid with GridNeverFailoverSpi:
NeverFailoverSpi spi = new NeverFailoverSpi(); IgniteConfiguration cfg = new IgniteConfiguration(); // Override default failover SPI. cfg.setFailoverSpiSpi(spi); // Starts grid. G.start(cfg);Here is an example on how to configure grid with
NeverFailoverSpi from Spring XML configuration file:
<property name="failoverSpi">
<bean class="org.apache.ignite.spi.failover.never.NeverFailoverSpi"/>
</property>
For information about Spring framework visit www.springframework.org
FailoverSpigridName, ignite| Constructor and Description |
|---|
NeverFailoverSpi() |
| Modifier and Type | Method and Description |
|---|---|
ClusterNode |
failover(FailoverContext ctx,
List<ClusterNode> top)
This method is called when method
ComputeTask.result(org.apache.ignite.compute.ComputeJobResult, List) returns
value ComputeJobResultPolicy.FAILOVER policy indicating that the result of
job execution must be failed over. |
void |
spiStart(String gridName)
This method is called to start SPI.
|
void |
spiStop()
This method is called to stop SPI.
|
String |
toString() |
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(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.public ClusterNode failover(FailoverContext ctx, List<ClusterNode> top)
ComputeTask.result(org.apache.ignite.compute.ComputeJobResult, List) returns
value ComputeJobResultPolicy.FAILOVER policy indicating that the result of
job execution must be failed over. Implementation of this method should examine failover
context and choose one of the grid nodes from supplied topology to retry job execution
on it. For best performance it is advised that FailoverContext.getBalancedNode(List)
method is used to select node for execution of failed job.failover in interface FailoverSpictx - Failover context.top - Collection of all grid nodes within task topology (may include failed node).null if new node cannot be picked.
If job failover fails (returns null) the whole task will be failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016