Apache Ignite.NET
Apache.Ignite.Core.Compute.ComputeJobAdapter< T > Class Template Referenceabstract

Convenience adapter for IComputeJob<T> implementations. It provides the following functionality: More...

Inheritance diagram for Apache.Ignite.Core.Compute.ComputeJobAdapter< T >:
Apache.Ignite.Core.Compute.IComputeJob< T >

Public Member Functions

void Cancel ()
 This method is called when system detects that completion of this job can no longer alter the overall outcome (for example, when parent task has already reduced the results). More...
 
void SetArguments (params object[] args)
 Sets given arguments. More...
 
TArg GetArgument< TArg > (int idx)
 Sets given arguments. More...
 
abstract T Execute ()
 Executes this job. More...
 
- Public Member Functions inherited from Apache.Ignite.Core.Compute.IComputeJob< T >
TRes Execute ()
 Executes this job. More...
 
void Cancel ()
 This method is called when system detects that completion of this job can no longer alter the overall outcome (for example, when parent task has already reduced the results). More...
 

Protected Member Functions

 ComputeJobAdapter ()
 No-arg constructor. More...
 
 ComputeJobAdapter (params object[] args)
 Creates job with specified arguments. More...
 
bool IsCancelled ()
 This method tests whether or not this job was cancelled. This method is thread-safe and can be called without extra synchronization. This method can be periodically called in IComputeJob<T>.Execute() method implementation to check whether or not this job cancelled. Note that system calls IComputeJob<T>.Cancel() method only as a hint and this is a responsibility of the implementation of the job to properly cancel its execution. More...
 

Detailed Description

Constructor & Destructor Documentation

Apache.Ignite.Core.Compute.ComputeJobAdapter< T >.ComputeJobAdapter ( params object[]  args)
protected
Parameters
argsOptional job arguments.

Member Function Documentation

Note that job cancellation is only a hint, and it is really up to the actual job instance to gracefully finish execution and exit.

abstract T Apache.Ignite.Core.Compute.ComputeJobAdapter< T >.Execute ( )
pure virtual
Returns
Job execution result (possibly null). This result will be returned in IComputeJobResult<T> object passed into IComputeTask<TA,T,TR>.OnResult on caller node.
TArg Apache.Ignite.Core.Compute.ComputeJobAdapter< T >.GetArgument< TArg > ( int  idx)
Parameters
idxIndex of the argument.
bool Apache.Ignite.Core.Compute.ComputeJobAdapter< T >.IsCancelled ( )
protected
Returns
True if this job was cancelled, false otherwise.
void Apache.Ignite.Core.Compute.ComputeJobAdapter< T >.SetArguments ( params object[]  args)
Parameters
argsOptional job arguments to set.