/// <summary> /// Executes given task on the grid projection. For step-by-step explanation of task execution process /// refer to <see cref="IComputeTask{A,T,R}"/> documentation. /// </summary> /// <param name="task">Task to execute.</param> /// <param name="taskArg">Optional task argument.</param> /// <returns>Task result.</returns> public IFuture <TR> Execute <TA, T, TR>(IComputeTask <TA, T, TR> task, TA taskArg) { IgniteArgumentCheck.NotNull(task, "task"); var holder = new ComputeTaskHolder <TA, T, TR>((Ignite)_prj.Ignite, this, task, taskArg); long ptr = Marshaller.Ignite.HandleRegistry.Allocate(holder); UU.ComputeExecuteNative(Target, ptr, _prj.TopologyVersion); return(holder.Future); }
/// <summary> /// Executes given task on the grid projection. For step-by-step explanation of task execution process /// refer to <see cref="IComputeTask{A,T,R}"/> documentation. /// </summary> /// <param name="task">Task to execute.</param> /// <param name="taskArg">Optional task argument.</param> /// <returns>Task result.</returns> public Future <TReduceRes> Execute <TArg, TJobRes, TReduceRes>(IComputeTask <TArg, TJobRes, TReduceRes> task, TArg taskArg) { IgniteArgumentCheck.NotNull(task, "task"); var holder = new ComputeTaskHolder <TArg, TJobRes, TReduceRes>((Ignite)_prj.Ignite, this, task, taskArg); long ptr = Marshaller.Ignite.HandleRegistry.Allocate(holder); var futTarget = UU.ComputeExecuteNative(Target, ptr, _prj.TopologyVersion); var future = holder.Future; future.SetTarget(futTarget); return(future); }