Package org.apache.ignite.spi.failover
Interface FailoverContext
-
public interface FailoverContextThis 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 StringaffinityCacheName()Returns affinity cache nameIgniteCompute.affinityRun(String, Object, IgniteRunnable)andIgniteCompute.affinityCall(String, Object, IgniteCallable).ClusterNodegetBalancedNode(List<ClusterNode> top)Gets the next balanced node for failed job.ComputeJobResultgetJobResult()Gets failed result of job execution.ComputeTaskSessiongetTaskSession()Gets current task session.intpartition()
-
-
-
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 (seeLoadBalancingSpito 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.
-
-