Class IgniteComputeImpl

    • Method Detail

      • clusterGroup

        public ClusterGroup clusterGroup()
        Gets cluster group to which this IgniteCompute instance belongs.
        Specified by:
        clusterGroup in interface IgniteCompute
        Returns:
        Cluster group to which this IgniteCompute instance belongs.
      • affinityRun

        public void affinityRun​(String cacheName,
                                Object affKey,
                                IgniteRunnable job)
        Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).

        It's guaranteed that the data of the whole partition, the affinity key belongs to, will present on the destination node throughout the job execution.
        Specified by:
        affinityRun in interface IgniteCompute
        Parameters:
        cacheName - Name of the cache to use for affinity co-location.
        affKey - Affinity key.
        job - Job which will be co-located on the node with given affinity key.
      • affinityRunAsync

        public IgniteFuture<Void> affinityRunAsync​(String cacheName,
                                                   Object affKey,
                                                   IgniteRunnable job)
                                            throws IgniteException
        Executes given job asynchronously on the node where data for provided affinity key is located (a.k.a. affinity co-location). The data of the partition where affKey is stored will not be migrated from the target node while the job is executed.
        Specified by:
        affinityRunAsync in interface IgniteCompute
        Parameters:
        cacheName - Name of the cache to use for affinity co-location.
        affKey - Affinity key.
        job - Job which will be co-located on the node with given affinity key.
        Returns:
        a Future representing pending completion of the affinity run.
        Throws:
        IgniteException - If job failed.
      • affinityRun

        public void affinityRun​(@NotNull
                                @NotNull Collection<String> cacheNames,
                                Object affKey,
                                IgniteRunnable job)
        Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).

        It's guaranteed that the data of all the partitions of all participating caches, the affinity key belongs to, will present on the destination node throughout the job execution.
        Specified by:
        affinityRun in interface IgniteCompute
        Parameters:
        cacheNames - Names of the caches to to reserve the partition. The first cache is used for affinity co-location.
        affKey - Affinity key.
        job - Job which will be co-located on the node with given affinity key.
      • affinityRunAsync

        public IgniteFuture<Void> affinityRunAsync​(@NotNull
                                                   @NotNull Collection<String> cacheNames,
                                                   Object affKey,
                                                   IgniteRunnable job)
                                            throws IgniteException
        Executes given job asynchronously on the node where data for provided affinity key is located (a.k.a. affinity co-location). The data of the partition where affKey is stored will not be migrated from the target node while the job is executed. The data of the extra caches' partitions with the same partition number also will not be migrated.
        Specified by:
        affinityRunAsync in interface IgniteCompute
        Parameters:
        cacheNames - Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
        affKey - Affinity key.
        job - Job which will be co-located on the node with given affinity key.
        Returns:
        a Future representing pending completion of the affinity run.
        Throws:
        IgniteException - If job failed.
      • affinityRun

        public void affinityRun​(@NotNull
                                @NotNull Collection<String> cacheNames,
                                int partId,
                                IgniteRunnable job)
        Executes given job on the node where partition is located (the partition is primary on the node)

        It's guaranteed that the data of all the partitions of all participating caches, the affinity key belongs to, will present on the destination node throughout the job execution.
        Specified by:
        affinityRun in interface IgniteCompute
        Parameters:
        cacheNames - Names of the caches to to reserve the partition. The first cache is used for affinity co-location.
        partId - Partition number.
        job - Job which will be co-located on the node with given affinity key.
      • affinityRunAsync

        public IgniteFuture<Void> affinityRunAsync​(@NotNull
                                                   @NotNull Collection<String> cacheNames,
                                                   int partId,
                                                   IgniteRunnable job)
                                            throws IgniteException
        Executes given job asynchronously on the node where partition is located (the partition is primary on the node) The data of the partition will not be migrated from the target node while the job is executed. The data of the extra caches' partitions with the same partition number also will not be migrated.
        Specified by:
        affinityRunAsync in interface IgniteCompute
        Parameters:
        cacheNames - Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
        partId - Partition number.
        job - Job which will be co-located on the node with given affinity key.
        Returns:
        a Future representing pending completion of the affinity run.
        Throws:
        IgniteException - If job failed.
      • affinityCall

        public <R> R affinityCall​(String cacheName,
                                  Object affKey,
                                  IgniteCallable<R> job)
        Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).

        It's guaranteed that the data of the whole partition, the affinity key belongs to, will present on the destination node throughout the job execution.
        Specified by:
        affinityCall in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        cacheName - Name of the cache to use for affinity co-location.
        affKey - Affinity key.
        job - Job which will be co-located on the node with given affinity key.
        Returns:
        Job result.
      • affinityCallAsync

        public <R> IgniteFuture<R> affinityCallAsync​(String cacheName,
                                                     Object affKey,
                                                     IgniteCallable<R> job)
                                              throws IgniteException
        Executes given job asynchronously on the node where data for provided affinity key is located (a.k.a. affinity co-location). The data of the partition where affKey is stored will not be migrated from the target node while the job is executed.
        Specified by:
        affinityCallAsync in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        cacheName - Name of the cache to use for affinity co-location.
        affKey - Affinity key.
        job - Job which will be co-located on the node with given affinity key.
        Returns:
        a Future representing pending completion of the affinity call.
        Throws:
        IgniteException - If job failed.
      • affinityCall

        public <R> R affinityCall​(@NotNull
                                  @NotNull Collection<String> cacheNames,
                                  Object affKey,
                                  IgniteCallable<R> job)
        Executes given job on the node where data for provided affinity key is located (a.k.a. affinity co-location).

        It's guaranteed that the data of all the partitions of all participating caches, the affinity key belongs to, will present on the destination node throughout the job execution.
        Specified by:
        affinityCall in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        cacheNames - Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
        affKey - Affinity key.
        job - Job which will be co-located on the node with given affinity key.
        Returns:
        Job result.
      • affinityCallAsync

        public <R> IgniteFuture<R> affinityCallAsync​(@NotNull
                                                     @NotNull Collection<String> cacheNames,
                                                     Object affKey,
                                                     IgniteCallable<R> job)
                                              throws IgniteException
        Executes given job asynchronously on the node where data for provided affinity key is located (a.k.a. affinity co-location). The data of the partition where affKey is stored will not be migrated from the target node while the job is executed. The data of the extra caches' partitions with the same partition number also will not be migrated.
        Specified by:
        affinityCallAsync in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        cacheNames - Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
        affKey - Affinity key.
        job - Job which will be co-located on the node with given affinity key.
        Returns:
        a Future representing pending completion of the affinity call.
        Throws:
        IgniteException - If job failed.
      • affinityCall

        public <R> R affinityCall​(@NotNull
                                  @NotNull Collection<String> cacheNames,
                                  int partId,
                                  IgniteCallable<R> job)
        Executes given job on the node where partition is located (the partition is primary on the node)

        It's guaranteed that the data of all the partitions of all participating caches, the affinity key belongs to, will present on the destination node throughout the job execution.
        Specified by:
        affinityCall in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        cacheNames - Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
        partId - Partition to reserve.
        job - Job which will be co-located on the node with given affinity key.
        Returns:
        Job result.
      • affinityCallAsync

        public <R> IgniteFuture<R> affinityCallAsync​(@NotNull
                                                     @NotNull Collection<String> cacheNames,
                                                     int partId,
                                                     IgniteCallable<R> job)
                                              throws IgniteException
        Executes given job asynchronously on the node where partition is located (the partition is primary on the node) The data of the partition will not be migrated from the target node while the job is executed. The data of the extra caches' partitions with the same partition number also will not be migrated.
        Specified by:
        affinityCallAsync in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        cacheNames - Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
        partId - Partition to reserve.
        job - Job which will be co-located on the node with given affinity key.
        Returns:
        a Future representing pending completion of the affinity call.
        Throws:
        IgniteException - If job failed.
      • execute

        public <T,​R> R execute​(String taskName,
                                     @Nullable
                                     T arg)
        Executes given task within the cluster group. For step-by-step explanation of task execution process refer to ComputeTask documentation.

        If task for given name has not been deployed yet, then taskName will be used as task class name to auto-deploy the task (see IgniteCompute.localDeployTask(Class, ClassLoader) method).

        If class with the same name was deployed more than once, the last deployed version is used. If method is called when other threads are deploying other versions of class with the same name there are no guarantees which version of the class will be executed.

        Specified by:
        execute in interface IgniteCompute
        Type Parameters:
        T - Type of the task argument.
        R - Type of the task result.
        Parameters:
        taskName - Name of the task to execute.
        arg - Optional argument of task execution, can be null.
        Returns:
        Task result.
        See Also:
        for information about task execution.
      • execute

        public <T,​R> R execute​(Class<? extends ComputeTask<T,​R>> taskCls,
                                     @Nullable
                                     T arg)
        Executes given task on within the cluster group. For step-by-step explanation of task execution process refer to ComputeTask documentation.
        Specified by:
        execute in interface IgniteCompute
        Type Parameters:
        T - Type of the task argument.
        R - Type of the task result.
        Parameters:
        taskCls - Class of the task to execute. If class has ComputeTaskName annotation, then task is deployed under a name specified within annotation. Otherwise, full class name is used as task name.
        arg - Optional argument of task execution, can be null.
        Returns:
        Task result.
      • executeAsync

        public <T,​R> ComputeTaskFuture<R> executeAsync​(Class<? extends ComputeTask<T,​R>> taskCls,
                                                             @Nullable
                                                             T arg)
                                                      throws IgniteException
        Executes given task asynchronously on within the cluster group. For step-by-step explanation of task execution process refer to ComputeTask documentation.
        Specified by:
        executeAsync in interface IgniteCompute
        Type Parameters:
        T - Type of the task argument.
        R - Type of the task result.
        Parameters:
        taskCls - Class of the task to execute. If class has ComputeTaskName annotation, then task is deployed under a name specified within annotation. Otherwise, full class name is used as task name.
        arg - Optional argument of task execution, can be null.
        Returns:
        a Future representing pending completion of the task.
        Throws:
        IgniteException - If task failed.
      • execute

        public <T,​R> R execute​(ComputeTask<T,​R> task,
                                     @Nullable
                                     T arg)
        Executes given task within the cluster group. For step-by-step explanation of task execution process refer to ComputeTask documentation.
        Specified by:
        execute in interface IgniteCompute
        Type Parameters:
        T - Type of the task argument.
        R - Type of the task result.
        Parameters:
        task - Instance of task to execute. If task class has ComputeTaskName annotation, then task is deployed under a name specified within annotation. Otherwise, full class name is used as task name.
        arg - Optional argument of task execution, can be null.
        Returns:
        Task result.
      • executeAsync

        public <T,​R> ComputeTaskFuture<R> executeAsync​(ComputeTask<T,​R> task,
                                                             @Nullable
                                                             T arg)
                                                      throws IgniteException
        Executes given task asynchronously within the cluster group. For step-by-step explanation of task execution process refer to ComputeTask documentation.
        Specified by:
        executeAsync in interface IgniteCompute
        Type Parameters:
        T - type.
        R - type.
        Parameters:
        task - Instance of task to execute. If task class has ComputeTaskName annotation, then task is deployed under a name specified within annotation. Otherwise, full class name is used as task name.
        arg - Optional argument of task execution, can be null.
        Returns:
        a Future representing pending completion of the task.
        Throws:
        IgniteException - If task failed.
      • broadcast

        public void broadcast​(IgniteRunnable job)
        Broadcasts given job to all nodes in the cluster group.
        Specified by:
        broadcast in interface IgniteCompute
        Parameters:
        job - Job to broadcast to all cluster group nodes.
      • broadcast

        public <R> Collection<R> broadcast​(IgniteCallable<R> job)
        Broadcasts given job to all nodes in cluster group. Every participating node will return a job result. Collection of all returned job results is returned from the result future.
        Specified by:
        broadcast in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        job - Job to broadcast to all cluster group nodes.
        Returns:
        Collection of results for this execution.
      • broadcastAsync

        public <R> IgniteFuture<Collection<R>> broadcastAsync​(IgniteCallable<R> job)
                                                       throws IgniteException
        Broadcasts given job asynchronously to all nodes in cluster group. Every participating node will return a job result. Collection of all returned job results is returned from the result future.
        Specified by:
        broadcastAsync in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        job - Job to broadcast to all cluster group nodes.
        Returns:
        a Future representing pending completion of the broadcast execution of the job.
        Throws:
        IgniteException - If execution failed.
      • broadcast

        public <R,​T> Collection<R> broadcast​(IgniteClosure<T,​R> job,
                                                   @Nullable
                                                   T arg)
        Broadcasts given closure job with passed in argument to all nodes in the cluster group. Every participating node will return a job result. Collection of all returned job results is returned from the result future.
        Specified by:
        broadcast in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        T - Type of the job argument.
        Parameters:
        job - Job to broadcast to all cluster group nodes.
        arg - Job closure argument.
        Returns:
        Collection of results for this execution.
      • broadcastAsync

        public <R,​T> IgniteFuture<Collection<R>> broadcastAsync​(IgniteClosure<T,​R> job,
                                                                      @Nullable
                                                                      T arg)
                                                               throws IgniteException
        Broadcasts given closure job asynchronously with passed in argument to all nodes in the cluster group. Every participating node will return a job result. Collection of all returned job results is returned from the result future.
        Specified by:
        broadcastAsync in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        T - Type of the job argument.
        Parameters:
        job - Job to broadcast to all cluster group nodes.
        arg - Job closure argument.
        Returns:
        a Future representing pending completion of the broadcast execution of the job.
        Throws:
        IgniteException - If execution failed.
      • run

        public void run​(IgniteRunnable job)
        Executes provided job on a node within the underlying cluster group.
        Specified by:
        run in interface IgniteCompute
        Parameters:
        job - Job closure to execute.
      • run

        public void run​(Collection<? extends IgniteRunnable> jobs)
        Executes collection of jobs on grid nodes within the underlying cluster group.
        Specified by:
        run in interface IgniteCompute
        Parameters:
        jobs - Collection of jobs to execute.
      • runAsync

        public IgniteFuture<Void> runAsync​(Collection<? extends IgniteRunnable> jobs)
                                    throws IgniteException
        Executes collection of jobs asynchronously on grid nodes within the underlying cluster group. Executes asynchronously. Returns control immediately.
        Specified by:
        runAsync in interface IgniteCompute
        Parameters:
        jobs - Collection of jobs to execute.
        Returns:
        a Future representing pending completion of the job.
        Throws:
        IgniteException - If execution failed.
      • apply

        public <R,​T> R apply​(IgniteClosure<T,​R> job,
                                   @Nullable
                                   T arg)
        Executes provided closure job on a node within the underlying cluster group. This method is different from run(...) and call(...) methods in a way that it receives job argument which is then passed into the closure at execution time.
        Specified by:
        apply in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        T - Type of the job argument.
        Parameters:
        job - Job to run.
        arg - Job argument.
        Returns:
        Job result.
      • applyAsync

        public <R,​T> IgniteFuture<R> applyAsync​(IgniteClosure<T,​R> job,
                                                      @Nullable
                                                      T arg)
                                               throws IgniteException
        Executes provided closure job asynchronously on a node within the underlying cluster group. This method is different from run(...) and call(...) methods in a way that it receives job argument which is then passed into the closure at execution time.
        Specified by:
        applyAsync in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        T - Type of the job argument.
        Parameters:
        job - Job to run.
        arg - Job argument.
        Returns:
        a Future representing pending completion of the job.
        Throws:
        IgniteException - If execution failed.
      • call

        public <R> R call​(IgniteCallable<R> job)
        Executes provided job on a node within the underlying cluster group. The result of the job execution is returned from the result closure.
        Specified by:
        call in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        job - Job to execute.
        Returns:
        Job result.
      • callAsync

        public <R> IgniteFuture<R> callAsync​(IgniteCallable<R> job)
                                      throws IgniteException
        Executes provided job asynchronously on a node within the underlying cluster group. The result of the job execution is returned from the result closure.
        Specified by:
        callAsync in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        job - Job to execute.
        Returns:
        a Future representing pending completion of the job.
        Throws:
        IgniteException - If execution failed.
      • call

        public <R> Collection<R> call​(Collection<? extends IgniteCallable<R>> jobs)
        Executes collection of jobs on nodes within the underlying cluster group. Collection of all returned job results is returned from the result future.
        Specified by:
        call in interface IgniteCompute
        Type Parameters:
        R - Type of the jobs result.
        Parameters:
        jobs - Non-empty collection of jobs to execute.
        Returns:
        Collection of job results for this execution.
      • callAsync

        public <R> IgniteFuture<Collection<R>> callAsync​(Collection<? extends IgniteCallable<R>> jobs)
                                                  throws IgniteException
        Executes collection of jobs asynchronously on nodes within the underlying cluster group. Collection of all returned job results is returned from the result future.
        Specified by:
        callAsync in interface IgniteCompute
        Type Parameters:
        R - Type of the job result.
        Parameters:
        jobs - Non-empty collection of jobs to execute.
        Returns:
        a Future representing pending completion of the job.
        Throws:
        IgniteException - If execution failed.
      • apply

        public <T,​R> Collection<R> apply​(IgniteClosure<T,​R> job,
                                               @Nullable
                                               @Nullable Collection<? extends T> args)
        Executes provided closure job on nodes within the underlying cluster group. 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.
        Specified by:
        apply in interface IgniteCompute
        Type Parameters:
        T - Type of the job argument.
        R - Type of the job result.
        Parameters:
        job - Job to run.
        args - Job arguments.
        Returns:
        Collection of job results.
      • applyAsync

        public <T,​R> IgniteFuture<Collection<R>> applyAsync​(IgniteClosure<T,​R> job,
                                                                  Collection<? extends T> args)
                                                           throws IgniteException
        Executes provided closure job asynchronously on nodes within the underlying cluster group. 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.
        Specified by:
        applyAsync in interface IgniteCompute
        Type Parameters:
        T - Type of the job argument.
        R - Type of the job result.
        Parameters:
        job - Job to run.
        args - Job arguments.
        Returns:
        a Future representing pending completion of the job.
        Throws:
        IgniteException - If execution failed.
      • call

        public <R1,​R2> R2 call​(Collection<? extends IgniteCallable<R1>> jobs,
                                     IgniteReducer<R1,​R2> rdc)
        Executes collection of jobs on nodes within the underlying cluster group. The returned job results will be reduced into an individual result by provided reducer.
        Specified by:
        call in interface IgniteCompute
        Type Parameters:
        R1 - Type of the job result.
        R2 - Type of the result returned by reducer.
        Parameters:
        jobs - Non-empty collection of jobs to execute.
        rdc - Reducer to reduce all job results into one individual return value.
        Returns:
        Reduced job result for this execution.
      • callAsync

        public <R1,​R2> IgniteFuture<R2> callAsync​(Collection<? extends IgniteCallable<R1>> jobs,
                                                        IgniteReducer<R1,​R2> rdc)
                                                 throws IgniteException
        Executes collection of jobs asynchronously on nodes within the underlying cluster group. The returned job results will be reduced into an individual result by provided reducer.
        Specified by:
        callAsync in interface IgniteCompute
        Type Parameters:
        R1 - Type of the job result.
        R2 - Type of the result returned by reducer.
        Parameters:
        jobs - Non-empty collection of jobs to execute.
        rdc - Reducer to reduce all job results into one individual return value.
        Returns:
        a Future with reduced job result for this execution.
        Throws:
        IgniteException - If execution failed.
      • apply

        public <R1,​R2,​T> R2 apply​(IgniteClosure<T,​R1> job,
                                              Collection<? extends T> args,
                                              IgniteReducer<R1,​R2> rdc)
        Executes provided closure job on nodes within the underlying cluster group. 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.
        Specified by:
        apply in interface IgniteCompute
        Type Parameters:
        R1 - Type of the job result.
        R2 - Type of the reducer argument.
        T - Type of the job argument.
        Parameters:
        job - Job to run.
        args - Job arguments.
        rdc - Reducer to reduce all job results into one individual return value.
        Returns:
        Reduced job result for this execution.
      • applyAsync

        public <R1,​R2,​T> IgniteFuture<R2> applyAsync​(IgniteClosure<T,​R1> job,
                                                                 Collection<? extends T> args,
                                                                 IgniteReducer<R1,​R2> rdc)
                                                          throws IgniteException
        Executes provided closure job asynchronously on nodes within the underlying cluster group. 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.
        Specified by:
        applyAsync in interface IgniteCompute
        Type Parameters:
        R1 - Type of the job result.
        R2 - Type of the reducer argument.
        T - Type of the job argument.
        Parameters:
        job - Job to run.
        args - Job arguments.
        rdc - Reducer to reduce all job results into one individual return value.
        Returns:
        a Future with reduced job result for this execution.
        Throws:
        IgniteException - If execution failed.
      • activeTaskFutures

        public <R> Map<IgniteUuid,​ComputeTaskFuture<R>> activeTaskFutures()
        Gets tasks future for active tasks started on local node.
        Specified by:
        activeTaskFutures in interface IgniteCompute
        Type Parameters:
        R - Type of the task result.
        Returns:
        Map of active tasks keyed by their task task session ID.
      • withName

        public IgniteCompute withName​(String taskName)
        Sets task name for the next executed task in the current thread. When task starts execution, the name is reset, so one name is used only once. You may use this method to set task name when executing jobs directly, without explicitly defining ComputeTask.

        Here is an example.

         ignite.withName("MyTask").run(new IgniteRunnable() {...});
         
        Specified by:
        withName in interface IgniteCompute
        Parameters:
        taskName - Task name.
        Returns:
        This IgniteCompute instance for chaining calls.
      • withTimeout

        public IgniteCompute withTimeout​(long timeout)
        Sets task timeout for the next executed task in the current thread. When task starts execution, the timeout is reset, so one timeout is used only once.

        Here is an example.

         ignite.withTimeout(10000).run(new IgniteRunnable() {...});
         
        Specified by:
        withTimeout in interface IgniteCompute
        Parameters:
        timeout - Computation timeout in milliseconds.
        Returns:
        This IgniteCompute instance for chaining calls.
      • withNoFailover

        public IgniteCompute withNoFailover()
        Sets no-failover flag for the next task executed 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.

        Here is an example.

         ignite.compute().withNoFailover().run(new IgniteRunnable() {...});
         
        Specified by:
        withNoFailover in interface IgniteCompute
        Returns:
        This IgniteCompute instance for chaining calls.
      • withNoResultCache

        public IgniteCompute withNoResultCache()
        Disables caching for the next executed task in the current thread. Has the same behaviour as annotation ComputeTaskNoResultCache.

        Here is an example.

         ignite.compute().withNoResultCache().run(new IgniteRunnable() {...});
         
        Specified by:
        withNoResultCache in interface IgniteCompute
        Returns:
        This IgniteCompute instance for chaining calls.
      • localDeployTask

        public void localDeployTask​(Class<? extends ComputeTask> taskCls,
                                    ClassLoader clsLdr)
        Explicitly deploys a task with given class loader on the local node. Upon completion of this method, a task can immediately be executed on the grid, considering that all participating remote nodes also have this task deployed.

        Note that tasks are automatically deployed upon first execution (if peer-class-loading is enabled), so use this method only when the provided class loader is different from the taskClass.getClassLoader().

        Another way of class deployment is deployment from local class path. Classes from local class path always have a priority over P2P deployed ones.

        Note that class can be deployed multiple times on remote nodes, i.e. re-deployed. Ignition maintains internal version of deployment for each instance of deployment (analogous to class and class loader in Java). Execution happens always on the latest deployed instance.

        This method has no effect if the class passed in was already deployed.

        Specified by:
        localDeployTask in interface IgniteCompute
        Parameters:
        taskCls - Task class to deploy. If task class has ComputeTaskName annotation, then task will be deployed under the name specified within annotation. Otherwise, full class name will be used as task's name.
        clsLdr - Task class loader. This class loader is in charge of loading all necessary resources for task execution.
      • localTasks

        public Map<String,​Class<? extends ComputeTask<?,​?>>> localTasks()
        Gets map of all locally deployed tasks keyed by their task name .
        Specified by:
        localTasks in interface IgniteCompute
        Returns:
        Map of locally deployed tasks keyed by their task name.
      • undeployTask

        public void undeployTask​(String taskName)
        Makes the best attempt to undeploy a task with given name within the underlying cluster group. Note that this method returns immediately and does not wait until the task will actually be undeployed on every node.
        Specified by:
        undeployTask in interface IgniteCompute
        Parameters:
        taskName - Name of the task to undeploy.
      • withExecutor

        public IgniteCompute withExecutor​(@NotNull
                                          @NotNull String name)
        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 executor with the given name doesn't exist, task will be processed in default ("public") pool.

        Executor should be defined in IgniteConfiguration.setExecutorConfiguration(ExecutorConfiguration...).

        Specified by:
        withExecutor in interface IgniteCompute
        Parameters:
        name - Custom executor name.
        Returns:
        Instance of compute API associated with custom executor.