Package org.apache.ignite.spi.failover
Interface FailoverContext
-
public interface FailoverContext
This interface defines a set of operations available to failover SPI one a given failed job.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable String
affinityCacheName()
Returns affinity cache nameIgniteCompute.affinityRun(String, Object, IgniteRunnable)
andIgniteCompute.affinityCall(String, Object, IgniteCallable)
.ClusterNode
getBalancedNode(List<ClusterNode> top)
Gets the next balanced node for failed job.ComputeJobResult
getJobResult()
Gets failed result of job execution.ComputeTaskSession
getTaskSession()
Gets current task session.int
partition()
-
-
-
Method Detail
-
getTaskSession
ComputeTaskSession getTaskSession()
Gets current task session.- Returns:
- Grid task session.
-
getJobResult
ComputeJobResult getJobResult()
Gets failed result of job execution.- Returns:
- Result of a failed job.
-
getBalancedNode
ClusterNode getBalancedNode(List<ClusterNode> top) throws IgniteException
Gets the next balanced node for failed job. Internally this method will delegate to load balancing SPI (seeLoadBalancingSpi
to determine the optimal node for execution.- Parameters:
top
- Topology to pick balanced node from.- Returns:
- The next balanced node.
- Throws:
IgniteException
- If anything failed.
-
partition
int partition()
Gets partition forIgniteCompute.affinityRun(Collection, int, IgniteRunnable)
andIgniteCompute.affinityCall(Collection, int, IgniteCallable)
.- Returns:
- Partition number.
-
affinityCacheName
@Nullable @Nullable String affinityCacheName()
Returns affinity cache nameIgniteCompute.affinityRun(String, Object, IgniteRunnable)
andIgniteCompute.affinityCall(String, Object, IgniteCallable)
.- Returns:
- Cache name.
-
-