Interface ICompute
Defines Ignite functionality for executing tasks and closures over nodes in the IClusterGroup. Instance of ICompute is obtained from grid projection using GetCompute() method.
Note that if attempt is made to execute a computation over an empty projection (i.e. projection that does
not have any alive nodes), ClusterGroupEmptyException
will be thrown out of result task.
Ignite must select a node for a computation to be executed. The node will be selected based on the
underlying GridLoadBalancingSpi
, which by default sequentially picks next available node from
grid projection. Other load balancing policies, such as random
or adaptive
, can be
configured as well by selecting different load balancing SPI in Ignite configuration. If your logic requires
some custom load balancing behavior, consider implementing ComputeTask
in Java directly.
Ignite guarantees that as long as there is at least one Ignite node standing, every job will be
executed. Jobs will automatically failover to another node if a remote node crashed or has rejected
execution due to lack of resources. By default, in case of failover, next load balanced node will be
picked for job execution. Also jobs will never be re-routed to the nodes they have failed on. This
behavior can be changed by configuring any of the existing or a custom FailoverSpi
in Ignite
configuration.
All members are thread-safe and may be used concurrently from multiple threads.
Namespace: Apache.Ignite.Core.Compute
Assembly: Apache.Ignite.Core.dll
Syntax
public interface ICompute
Properties
ClusterGroup
Grid projection to which this compute instance belongs.
Declaration
IClusterGroup ClusterGroup { get; }
Property Value
Type | Description |
---|---|
IClusterGroup |
Methods
AffinityCall<TRes>(IEnumerable<String>, Int32, IComputeFunc<TRes>)
Executes given job on the node where data for provided partition is located.
Declaration
TRes AffinityCall<TRes>(IEnumerable<string> cacheNames, int partition, IComputeFunc<TRes> func)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | cacheNames | Names of the caches to reserve the partition in. The first cache is used for affinity co-location. |
System.Int32 | partition | Partition number. |
IComputeFunc<TRes> | func | Job to execute. |
Returns
Type | Description |
---|---|
TRes | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
AffinityCall<TRes>(String, Object, IComputeFunc<TRes>)
Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).
Declaration
TRes AffinityCall<TRes>(string cacheName, object affinityKey, IComputeFunc<TRes> clo)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache to use for affinity co-location. |
System.Object | affinityKey | Affinity key. |
IComputeFunc<TRes> | clo | Job to execute. |
Returns
Type | Description |
---|---|
TRes | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
AffinityCallAsync<TRes>(IEnumerable<String>, Int32, IComputeFunc<TRes>)
Executes given job on the node where data for provided partition is located.
Declaration
Task<TRes> AffinityCallAsync<TRes>(IEnumerable<string> cacheNames, int partition, IComputeFunc<TRes> func)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | cacheNames | Names of the caches to reserve the partition in. The first cache is used for affinity co-location. |
System.Int32 | partition | Partition number. |
IComputeFunc<TRes> | func | Job to execute. |
Returns
Type | Description |
---|---|
Task<TRes> | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
AffinityCallAsync<TRes>(IEnumerable<String>, Int32, IComputeFunc<TRes>, CancellationToken)
Executes given job on the node where data for provided partition is located.
Declaration
Task<TRes> AffinityCallAsync<TRes>(IEnumerable<string> cacheNames, int partition, IComputeFunc<TRes> func, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | cacheNames | Names of the caches to reserve the partition in. The first cache is used for affinity co-location. |
System.Int32 | partition | Partition number. |
IComputeFunc<TRes> | func | Job to execute. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
AffinityCallAsync<TRes>(String, Object, IComputeFunc<TRes>)
Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).
Declaration
Task<TRes> AffinityCallAsync<TRes>(string cacheName, object affinityKey, IComputeFunc<TRes> clo)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache to use for affinity co-location. |
System.Object | affinityKey | Affinity key. |
IComputeFunc<TRes> | clo | Job to execute. |
Returns
Type | Description |
---|---|
Task<TRes> | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
AffinityCallAsync<TRes>(String, Object, IComputeFunc<TRes>, CancellationToken)
Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).
Declaration
Task<TRes> AffinityCallAsync<TRes>(string cacheName, object affinityKey, IComputeFunc<TRes> clo, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache to use for affinity co-location. |
System.Object | affinityKey | Affinity key. |
IComputeFunc<TRes> | clo | Job to execute. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
AffinityRun(IEnumerable<String>, Int32, IComputeAction)
Executes given job on the node where data for provided partition is located (a.k.a. affinity co-location).
Declaration
void AffinityRun(IEnumerable<string> cacheNames, int partition, IComputeAction action)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | cacheNames | Names of the caches to reserve the partition in. The first cache is used for affinity co-location. |
System.Int32 | partition | Partition number. |
IComputeAction | action | Job to execute. |
AffinityRun(String, Object, IComputeAction)
Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).
Declaration
void AffinityRun(string cacheName, object affinityKey, IComputeAction action)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache to use for affinity co-location. |
System.Object | affinityKey | Affinity key. |
IComputeAction | action | Job to execute. |
AffinityRunAsync(IEnumerable<String>, Int32, IComputeAction)
Executes given job on the node where data for provided partition is located (a.k.a. affinity co-location).
Declaration
Task AffinityRunAsync(IEnumerable<string> cacheNames, int partition, IComputeAction action)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | cacheNames | Names of the caches to reserve the partition in. The first cache is used for affinity co-location. |
System.Int32 | partition | Partition number. |
IComputeAction | action | Job to execute. |
Returns
Type | Description |
---|---|
Task |
AffinityRunAsync(IEnumerable<String>, Int32, IComputeAction, CancellationToken)
Executes given job on the node where data for provided partition is located (a.k.a. affinity co-location).
Declaration
Task AffinityRunAsync(IEnumerable<string> cacheNames, int partition, IComputeAction action, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | cacheNames | Names of the caches to reserve the partition in. The first cache is used for affinity co-location. |
System.Int32 | partition | Partition number. |
IComputeAction | action | Job to execute. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
AffinityRunAsync(String, Object, IComputeAction)
Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).
Declaration
Task AffinityRunAsync(string cacheName, object affinityKey, IComputeAction action)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache to use for affinity co-location. |
System.Object | affinityKey | Affinity key. |
IComputeAction | action | Job to execute. |
Returns
Type | Description |
---|---|
Task |
AffinityRunAsync(String, Object, IComputeAction, CancellationToken)
Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).
Declaration
Task AffinityRunAsync(string cacheName, object affinityKey, IComputeAction action, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Name of the cache to use for affinity co-location. |
System.Object | affinityKey | Affinity key. |
IComputeAction | action | Job to execute. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | Task. |
Apply<TArg, TRes>(IComputeFunc<TArg, TRes>, TArg)
Executes provided closure job on a node in this grid projection.
Declaration
TRes Apply<TArg, TRes>(IComputeFunc<TArg, TRes> clo, TArg arg)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TRes> | clo | Job to run. |
TArg | arg | Job argument. |
Returns
Type | Description |
---|---|
TRes | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TRes | Type of job result. |
Apply<TArg, TRes>(IComputeFunc<TArg, TRes>, IEnumerable<TArg>)
Executes provided closure job on nodes within this grid projection. A new job is executed for every argument in the passed in collection. The number of actual job executions will be equal to size of the job arguments collection.
Declaration
ICollection<TRes> Apply<TArg, TRes>(IComputeFunc<TArg, TRes> clo, IEnumerable<TArg> args)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TRes> | clo | Job to run. |
IEnumerable<TArg> | args | Job arguments. |
Returns
Type | Description |
---|---|
ICollection<TRes> | Collection of job results. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TRes | Type of job result. |
Apply<TArg, TFuncRes, TRes>(IComputeFunc<TArg, TFuncRes>, IEnumerable<TArg>, IComputeReducer<TFuncRes, TRes>)
Executes provided closure job on nodes within this grid projection. A new job is executed for every argument in the passed in collection. The number of actual job executions will be equal to size of the job arguments collection. The returned job results will be reduced into an individual result by provided reducer.
Declaration
TRes Apply<TArg, TFuncRes, TRes>(IComputeFunc<TArg, TFuncRes> clo, IEnumerable<TArg> args, IComputeReducer<TFuncRes, TRes> rdc)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TFuncRes> | clo | Job to run. |
IEnumerable<TArg> | args | Job arguments. |
IComputeReducer<TFuncRes, TRes> | rdc | Reducer to reduce all job results into one individual return value. |
Returns
Type | Description |
---|---|
TRes | Reduced job result for this execution. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TFuncRes | Type of function result. |
TRes | Type of result after reduce. |
ApplyAsync<TArg, TRes>(IComputeFunc<TArg, TRes>, TArg)
Executes provided closure job on a node in this grid projection.
Declaration
Task<TRes> ApplyAsync<TArg, TRes>(IComputeFunc<TArg, TRes> clo, TArg arg)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TRes> | clo | Job to run. |
TArg | arg | Job argument. |
Returns
Type | Description |
---|---|
Task<TRes> | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TRes | Type of job result. |
ApplyAsync<TArg, TRes>(IComputeFunc<TArg, TRes>, TArg, CancellationToken)
Executes provided closure job on a node in this grid projection.
Declaration
Task<TRes> ApplyAsync<TArg, TRes>(IComputeFunc<TArg, TRes> clo, TArg arg, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TRes> | clo | Job to run. |
TArg | arg | Job argument. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TRes | Type of job result. |
ApplyAsync<TArg, TRes>(IComputeFunc<TArg, TRes>, IEnumerable<TArg>)
Executes provided closure job on nodes within this grid projection. A new job is executed for every argument in the passed in collection. The number of actual job executions will be equal to size of the job arguments collection.
Declaration
Task<ICollection<TRes>> ApplyAsync<TArg, TRes>(IComputeFunc<TArg, TRes> clo, IEnumerable<TArg> args)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TRes> | clo | Job to run. |
IEnumerable<TArg> | args | Job arguments. |
Returns
Type | Description |
---|---|
Task<ICollection<TRes>> | Collection of job results. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TRes | Type of job result. |
ApplyAsync<TArg, TRes>(IComputeFunc<TArg, TRes>, IEnumerable<TArg>, CancellationToken)
Executes provided closure job on nodes within this grid projection. A new job is executed for every argument in the passed in collection. The number of actual job executions will be equal to size of the job arguments collection.
Declaration
Task<ICollection<TRes>> ApplyAsync<TArg, TRes>(IComputeFunc<TArg, TRes> clo, IEnumerable<TArg> args, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TRes> | clo | Job to run. |
IEnumerable<TArg> | args | Job arguments. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<ICollection<TRes>> | Collection of job results. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TRes | Type of job result. |
ApplyAsync<TArg, TFuncRes, TRes>(IComputeFunc<TArg, TFuncRes>, IEnumerable<TArg>, IComputeReducer<TFuncRes, TRes>)
Executes provided closure job on nodes within this grid projection. A new job is executed for every argument in the passed in collection. The number of actual job executions will be equal to size of the job arguments collection. The returned job results will be reduced into an individual result by provided reducer.
Declaration
Task<TRes> ApplyAsync<TArg, TFuncRes, TRes>(IComputeFunc<TArg, TFuncRes> clo, IEnumerable<TArg> args, IComputeReducer<TFuncRes, TRes> rdc)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TFuncRes> | clo | Job to run. |
IEnumerable<TArg> | args | Job arguments. |
IComputeReducer<TFuncRes, TRes> | rdc | Reducer to reduce all job results into one individual return value. |
Returns
Type | Description |
---|---|
Task<TRes> | Reduced job result for this execution. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TFuncRes | Type of function result. |
TRes | Type of result after reduce. |
ApplyAsync<TArg, TFuncRes, TRes>(IComputeFunc<TArg, TFuncRes>, IEnumerable<TArg>, IComputeReducer<TFuncRes, TRes>, CancellationToken)
Executes provided closure job on nodes within this grid projection. A new job is executed for every argument in the passed in collection. The number of actual job executions will be equal to size of the job arguments collection. The returned job results will be reduced into an individual result by provided reducer.
Declaration
Task<TRes> ApplyAsync<TArg, TFuncRes, TRes>(IComputeFunc<TArg, TFuncRes> clo, IEnumerable<TArg> args, IComputeReducer<TFuncRes, TRes> rdc, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TFuncRes> | clo | Job to run. |
IEnumerable<TArg> | args | Job arguments. |
IComputeReducer<TFuncRes, TRes> | rdc | Reducer to reduce all job results into one individual return value. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Reduced job result for this execution. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TFuncRes | Type of function result. |
TRes | Type of result after reduce. |
Broadcast(IComputeAction)
Broadcasts given job to all nodes in grid projection.
Declaration
void Broadcast(IComputeAction action)
Parameters
Type | Name | Description |
---|---|---|
IComputeAction | action | Job to broadcast to all projection nodes. |
Broadcast<TRes>(IComputeFunc<TRes>)
Broadcasts given job to all nodes in grid projection. Every participating node will return a job result.
Declaration
ICollection<TRes> Broadcast<TRes>(IComputeFunc<TRes> clo)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TRes> | clo | Job to broadcast to all projection nodes. |
Returns
Type | Description |
---|---|
ICollection<TRes> | Collection of results for this execution. |
Type Parameters
Name | Description |
---|---|
TRes |
Broadcast<TArg, TRes>(IComputeFunc<TArg, TRes>, TArg)
Broadcasts given closure job with passed in argument to all nodes in grid projection. Every participating node will return a job result.
Declaration
ICollection<TRes> Broadcast<TArg, TRes>(IComputeFunc<TArg, TRes> clo, TArg arg)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TRes> | clo | Job to broadcast to all projection nodes. |
TArg | arg | Job closure argument. |
Returns
Type | Description |
---|---|
ICollection<TRes> | Collection of results for this execution. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TRes | Type of job result. |
BroadcastAsync(IComputeAction)
Broadcasts given job to all nodes in grid projection.
Declaration
Task BroadcastAsync(IComputeAction action)
Parameters
Type | Name | Description |
---|---|---|
IComputeAction | action | Job to broadcast to all projection nodes. |
Returns
Type | Description |
---|---|
Task |
BroadcastAsync(IComputeAction, CancellationToken)
Broadcasts given job to all nodes in grid projection.
Declaration
Task BroadcastAsync(IComputeAction action, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeAction | action | Job to broadcast to all projection nodes. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | Task. |
BroadcastAsync<TRes>(IComputeFunc<TRes>)
Broadcasts given job to all nodes in grid projection. Every participating node will return a job result.
Declaration
Task<ICollection<TRes>> BroadcastAsync<TRes>(IComputeFunc<TRes> clo)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TRes> | clo | Job to broadcast to all projection nodes. |
Returns
Type | Description |
---|---|
Task<ICollection<TRes>> | Collection of results for this execution. |
Type Parameters
Name | Description |
---|---|
TRes |
BroadcastAsync<TRes>(IComputeFunc<TRes>, CancellationToken)
Broadcasts given job to all nodes in grid projection. Every participating node will return a job result.
Declaration
Task<ICollection<TRes>> BroadcastAsync<TRes>(IComputeFunc<TRes> clo, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TRes> | clo | Job to broadcast to all projection nodes. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<ICollection<TRes>> | Collection of results for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | The type of the resource. |
BroadcastAsync<TArg, TRes>(IComputeFunc<TArg, TRes>, TArg)
Broadcasts given closure job with passed in argument to all nodes in grid projection. Every participating node will return a job result.
Declaration
Task<ICollection<TRes>> BroadcastAsync<TArg, TRes>(IComputeFunc<TArg, TRes> clo, TArg arg)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TRes> | clo | Job to broadcast to all projection nodes. |
TArg | arg | Job closure argument. |
Returns
Type | Description |
---|---|
Task<ICollection<TRes>> | Collection of results for this execution. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TRes | Type of job result. |
BroadcastAsync<TArg, TRes>(IComputeFunc<TArg, TRes>, TArg, CancellationToken)
Broadcasts given closure job with passed in argument to all nodes in grid projection. Every participating node will return a job result.
Declaration
Task<ICollection<TRes>> BroadcastAsync<TArg, TRes>(IComputeFunc<TArg, TRes> clo, TArg arg, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TArg, TRes> | clo | Job to broadcast to all projection nodes. |
TArg | arg | Job closure argument. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<ICollection<TRes>> | Collection of results for this execution. |
Type Parameters
Name | Description |
---|---|
TArg | Type of argument. |
TRes | Type of job result. |
Call<TRes>(IComputeFunc<TRes>)
Executes provided job on a node in this grid projection. The result of the job execution is returned from the result closure.
Declaration
TRes Call<TRes>(IComputeFunc<TRes> clo)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TRes> | clo | Job to execute. |
Returns
Type | Description |
---|---|
TRes | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
Call<TRes>(IEnumerable<IComputeFunc<TRes>>)
Executes collection of jobs on nodes within this grid projection.
Declaration
ICollection<TRes> Call<TRes>(IEnumerable<IComputeFunc<TRes>> clos)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IComputeFunc<TRes>> | clos | Collection of jobs to execute. |
Returns
Type | Description |
---|---|
ICollection<TRes> | Collection of job results for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
Call<TFuncRes, TRes>(IEnumerable<IComputeFunc<TFuncRes>>, IComputeReducer<TFuncRes, TRes>)
Executes collection of jobs on nodes within this grid projection.
Declaration
TRes Call<TFuncRes, TRes>(IEnumerable<IComputeFunc<TFuncRes>> clos, IComputeReducer<TFuncRes, TRes> reducer)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IComputeFunc<TFuncRes>> | clos | Collection of jobs to execute. |
IComputeReducer<TFuncRes, TRes> | reducer | Reducer to reduce all job results into one individual return value. |
Returns
Type | Description |
---|---|
TRes | Reduced job result for this execution. |
Type Parameters
Name | Description |
---|---|
TFuncRes | Type of function result. |
TRes | Type of result after reduce. |
CallAsync<TRes>(IComputeFunc<TRes>)
Executes provided job on a node in this grid projection. The result of the job execution is returned from the result closure.
Declaration
Task<TRes> CallAsync<TRes>(IComputeFunc<TRes> clo)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TRes> | clo | Job to execute. |
Returns
Type | Description |
---|---|
Task<TRes> | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
CallAsync<TRes>(IComputeFunc<TRes>, CancellationToken)
Executes provided job on a node in this grid projection. The result of the job execution is returned from the result closure.
Declaration
Task<TRes> CallAsync<TRes>(IComputeFunc<TRes> clo, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeFunc<TRes> | clo | Job to execute. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Job result for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
CallAsync<TRes>(IEnumerable<IComputeFunc<TRes>>)
Executes collection of jobs on nodes within this grid projection.
Declaration
Task<ICollection<TRes>> CallAsync<TRes>(IEnumerable<IComputeFunc<TRes>> clos)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IComputeFunc<TRes>> | clos | Collection of jobs to execute. |
Returns
Type | Description |
---|---|
Task<ICollection<TRes>> | Collection of job results for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
CallAsync<TRes>(IEnumerable<IComputeFunc<TRes>>, CancellationToken)
Executes collection of jobs on nodes within this grid projection.
Declaration
Task<ICollection<TRes>> CallAsync<TRes>(IEnumerable<IComputeFunc<TRes>> clos, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IComputeFunc<TRes>> | clos | Collection of jobs to execute. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<ICollection<TRes>> | Collection of job results for this execution. |
Type Parameters
Name | Description |
---|---|
TRes | Type of job result. |
CallAsync<TFuncRes, TRes>(IEnumerable<IComputeFunc<TFuncRes>>, IComputeReducer<TFuncRes, TRes>)
Executes collection of jobs on nodes within this grid projection.
Declaration
Task<TRes> CallAsync<TFuncRes, TRes>(IEnumerable<IComputeFunc<TFuncRes>> clos, IComputeReducer<TFuncRes, TRes> reducer)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IComputeFunc<TFuncRes>> | clos | Collection of jobs to execute. |
IComputeReducer<TFuncRes, TRes> | reducer | Reducer to reduce all job results into one individual return value. |
Returns
Type | Description |
---|---|
Task<TRes> | Reduced job result for this execution. |
Type Parameters
Name | Description |
---|---|
TFuncRes | Type of function result. |
TRes | Type of result after reduce. |
CallAsync<TFuncRes, TRes>(IEnumerable<IComputeFunc<TFuncRes>>, IComputeReducer<TFuncRes, TRes>, CancellationToken)
Executes collection of jobs on nodes within this grid projection.
Declaration
Task<TRes> CallAsync<TFuncRes, TRes>(IEnumerable<IComputeFunc<TFuncRes>> clos, IComputeReducer<TFuncRes, TRes> reducer, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IComputeFunc<TFuncRes>> | clos | Collection of jobs to execute. |
IComputeReducer<TFuncRes, TRes> | reducer | Reducer to reduce all job results into one individual return value. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Reduced job result for this execution. |
Type Parameters
Name | Description |
---|---|
TFuncRes | Type of function result. |
TRes | Type of result after reduce. |
Execute<TJobRes, TRes>(IComputeTask<TJobRes, TRes>)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
TRes Execute<TJobRes, TRes>(IComputeTask<TJobRes, TRes> task)
Parameters
Type | Name | Description |
---|---|---|
IComputeTask<TJobRes, TRes> | task | Task to execute. |
Returns
Type | Description |
---|---|
TRes | Task result. |
Type Parameters
Name | Description |
---|---|
TJobRes | Type of job result. |
TRes | Type of reduce result. |
Execute<TJobRes, TRes>(Type)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
TRes Execute<TJobRes, TRes>(Type taskType)
Parameters
Type | Name | Description |
---|---|---|
Type | taskType | Task type. |
Returns
Type | Description |
---|---|
TRes | Task result. |
Type Parameters
Name | Description |
---|---|
TJobRes | Type of job result. |
TRes | Type of reduce result. |
Execute<TArg, TJobRes, TRes>(IComputeTask<TArg, TJobRes, TRes>, TArg)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
TRes Execute<TArg, TJobRes, TRes>(IComputeTask<TArg, TJobRes, TRes> task, TArg taskArg)
Parameters
Type | Name | Description |
---|---|---|
IComputeTask<TArg, TJobRes, TRes> | task | Task to execute. |
TArg | taskArg | Optional task argument. |
Returns
Type | Description |
---|---|
TRes | Task result. |
Type Parameters
Name | Description |
---|---|
TArg | Argument type. |
TJobRes | Type of job result. |
TRes | Type of final task result. |
Execute<TArg, TJobRes, TRes>(Type, TArg)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
TRes Execute<TArg, TJobRes, TRes>(Type taskType, TArg taskArg)
Parameters
Type | Name | Description |
---|---|---|
Type | taskType | Task type. |
TArg | taskArg | Optional task argument. |
Returns
Type | Description |
---|---|
TRes | Task result. |
Type Parameters
Name | Description |
---|---|
TArg | Argument type. |
TJobRes | Type of job result. |
TRes | Type of reduce result. |
ExecuteAsync<TJobRes, TRes>(IComputeTask<TJobRes, TRes>)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
Task<TRes> ExecuteAsync<TJobRes, TRes>(IComputeTask<TJobRes, TRes> task)
Parameters
Type | Name | Description |
---|---|---|
IComputeTask<TJobRes, TRes> | task | Task to execute. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TJobRes | Type of job result. |
TRes | Type of reduce result. |
ExecuteAsync<TJobRes, TRes>(IComputeTask<TJobRes, TRes>, CancellationToken)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
Task<TRes> ExecuteAsync<TJobRes, TRes>(IComputeTask<TJobRes, TRes> task, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeTask<TJobRes, TRes> | task | Task to execute. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TJobRes | Type of job result. |
TRes | Type of reduce result. |
ExecuteAsync<TJobRes, TRes>(Type)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
Task<TRes> ExecuteAsync<TJobRes, TRes>(Type taskType)
Parameters
Type | Name | Description |
---|---|---|
Type | taskType | Task type. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TJobRes | Type of job result. |
TRes | Type of reduce result. |
ExecuteAsync<TJobRes, TRes>(Type, CancellationToken)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
Task<TRes> ExecuteAsync<TJobRes, TRes>(Type taskType, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Type | taskType | Task type. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TJobRes | Type of job result. |
TRes | Type of reduce result. |
ExecuteAsync<TArg, TJobRes, TRes>(IComputeTask<TArg, TJobRes, TRes>, TArg)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
Task<TRes> ExecuteAsync<TArg, TJobRes, TRes>(IComputeTask<TArg, TJobRes, TRes> task, TArg taskArg)
Parameters
Type | Name | Description |
---|---|---|
IComputeTask<TArg, TJobRes, TRes> | task | Task to execute. |
TArg | taskArg | Optional task argument. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TArg | Argument type. |
TJobRes | Type of job result. |
TRes | Type of final task result. |
ExecuteAsync<TArg, TJobRes, TRes>(IComputeTask<TArg, TJobRes, TRes>, TArg, CancellationToken)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
Task<TRes> ExecuteAsync<TArg, TJobRes, TRes>(IComputeTask<TArg, TJobRes, TRes> task, TArg taskArg, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeTask<TArg, TJobRes, TRes> | task | Task to execute. |
TArg | taskArg | Optional task argument. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TArg | Argument type. |
TJobRes | Type of job result. |
TRes | Type of final task result. |
ExecuteAsync<TArg, TJobRes, TRes>(Type, TArg)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
Task<TRes> ExecuteAsync<TArg, TJobRes, TRes>(Type taskType, TArg taskArg)
Parameters
Type | Name | Description |
---|---|---|
Type | taskType | Task type. |
TArg | taskArg | Optional task argument. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TArg | Argument type. |
TJobRes | Type of job result. |
TRes | Type of reduce result. |
ExecuteAsync<TArg, TJobRes, TRes>(Type, TArg, CancellationToken)
Executes given task on the grid projection. For step-by-step explanation of task execution process refer to IComputeTask<TArg, TJobRes, TRes> documentation.
Declaration
Task<TRes> ExecuteAsync<TArg, TJobRes, TRes>(Type taskType, TArg taskArg, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Type | taskType | Task type. |
TArg | taskArg | Optional task argument. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TArg | Argument type. |
TJobRes | Type of job result. |
TRes | Type of reduce result. |
ExecuteJavaTask<TRes>(String, Object)
Executes given Java task on the grid projection. If task for given name has not been deployed yet, then 'taskName' will be used as task class name to auto-deploy the task.
Declaration
TRes ExecuteJavaTask<TRes>(string taskName, object taskArg)
Parameters
Type | Name | Description |
---|---|---|
System.String | taskName | Java task name |
System.Object | taskArg | Optional argument of task execution, can be null. |
Returns
Type | Description |
---|---|
TRes | Task result. |
Type Parameters
Name | Description |
---|---|
TRes | Type of task result. |
ExecuteJavaTaskAsync<TRes>(String, Object)
Executes given Java task on the grid projection. If task for given name has not been deployed yet, then 'taskName' will be used as task class name to auto-deploy the task.
Declaration
Task<TRes> ExecuteJavaTaskAsync<TRes>(string taskName, object taskArg)
Parameters
Type | Name | Description |
---|---|---|
System.String | taskName | Java task name |
System.Object | taskArg | Optional argument of task execution, can be null. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TRes | Type of task result. |
ExecuteJavaTaskAsync<TRes>(String, Object, CancellationToken)
Executes given Java task on the grid projection. If task for given name has not been deployed yet, then 'taskName' will be used as task class name to auto-deploy the task.
Declaration
Task<TRes> ExecuteJavaTaskAsync<TRes>(string taskName, object taskArg, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | taskName | Java task name |
System.Object | taskArg | Optional argument of task execution, can be null. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<TRes> | Task result. |
Type Parameters
Name | Description |
---|---|
TRes | Type of task result. |
Run(IComputeAction)
Executes provided job on a node in this grid projection.
Declaration
void Run(IComputeAction action)
Parameters
Type | Name | Description |
---|---|---|
IComputeAction | action | Job to execute. |
Run(IEnumerable<IComputeAction>)
Executes collection of jobs on Ignite nodes within this grid projection.
Declaration
void Run(IEnumerable<IComputeAction> actions)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IComputeAction> | actions | Jobs to execute. |
RunAsync(IComputeAction)
Executes provided job on a node in this grid projection.
Declaration
Task RunAsync(IComputeAction action)
Parameters
Type | Name | Description |
---|---|---|
IComputeAction | action | Job to execute. |
Returns
Type | Description |
---|---|
Task |
RunAsync(IComputeAction, CancellationToken)
Executes provided job on a node in this grid projection.
Declaration
Task RunAsync(IComputeAction action, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IComputeAction | action | Job to execute. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
RunAsync(IEnumerable<IComputeAction>)
Executes collection of jobs on Ignite nodes within this grid projection.
Declaration
Task RunAsync(IEnumerable<IComputeAction> actions)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IComputeAction> | actions | Jobs to execute. |
Returns
Type | Description |
---|---|
Task |
RunAsync(IEnumerable<IComputeAction>, CancellationToken)
Executes collection of jobs on Ignite nodes within this grid projection.
Declaration
Task RunAsync(IEnumerable<IComputeAction> actions, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IComputeAction> | actions | Jobs to execute. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | Task. |
WithExecutor(String)
Gets instance of the compute API associated with custom executor. All tasks and closures submitted to returned instance will be processed by this executor on both remote and local nodes. If an executor with the given name doesn't exist, task will be processed in default ("public") pool.
Executor should be defined in ExecutorConfiguration.
Declaration
ICompute WithExecutor(string executorName)
Parameters
Type | Name | Description |
---|---|---|
System.String | executorName | Executor name. |
Returns
Type | Description |
---|---|
ICompute | New Compute instance associated with a custom executor. |
WithKeepBinary()
Sets keep-binary flag for the next executed Java task on this projection in the current thread so that task argument passed to Java and returned task results will not be deserialized.
Declaration
ICompute WithKeepBinary()
Returns
Type | Description |
---|---|
ICompute | This compute instance for chaining calls. |
WithNoFailover()
Sets no-failover flag for the next executed task on this projection in the current thread. If flag is set, job will be never failed over even if remote node crashes or rejects execution. When task starts execution, the no-failover flag is reset, so all other task will use default failover policy, unless this flag is set again.
Declaration
ICompute WithNoFailover()
Returns
Type | Description |
---|---|
ICompute | This compute instance for chaining calls. |
WithNoResultCache()
Disables caching for the next executed task in the current thread.
Declaration
ICompute WithNoResultCache()
Returns
Type | Description |
---|---|
ICompute | This compute instance for chaining calls. |
WithTimeout(Int64)
Sets task timeout for the next executed task on this projection in the current thread. When task starts execution, the timeout is reset, so one timeout is used only once.
Declaration
ICompute WithTimeout(long timeout)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | timeout | Computation timeout in milliseconds. |
Returns
Type | Description |
---|---|
ICompute | This compute instance for chaining calls. |