org.apache.ignite.internal.commandline

## Class TaskExecutor

- java.lang.Object
- - org.apache.ignite.internal.commandline.TaskExecutor

    public class TaskExecutor
    extends Object

Visor task executor.

### Field Summary

Fields
`static UUID` `BROADCAST_UUID` Broadcast uuid.
`static String` `DFLT_HOST`
`static String` `DFLT_PORT`

### Constructor Summary

Constructors
Constructor and Description
`TaskExecutor()`

### Method Summary

All Methods Static Methods Concrete Methods
`static <R> R` `executeTask(GridClient client, Class<? extends ComputeTask<?,R>> taskCls, Object taskArgs, GridClientConfiguration clientCfg)`
`static <R> R` `executeTaskByNameOnNode(GridClient client, String taskClsName, Object taskArgs, UUID nodeId, GridClientConfiguration clientCfg)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DFLT_HOST

    public static final String DFLT_HOST

See Also:
  Constant Field Values

#### DFLT_PORT

    public static final String DFLT_PORT

See Also:
  Constant Field Values

#### BROADCAST_UUID

    public static final UUID BROADCAST_UUID

Broadcast uuid.

### Constructor Detail

#### TaskExecutor

    public TaskExecutor()

### Method Detail

#### executeTaskByNameOnNode

    public static <R> R executeTaskByNameOnNode(GridClient client,
                                                String taskClsName,
                                                Object taskArgs,
                                                UUID nodeId,
                                                GridClientConfiguration clientCfg)
                                         throws GridClientException

Parameters:
  `client` - Client
  `taskClsName` - Task class name.
  `taskArgs` - Task args.
  `nodeId` - Node ID to execute task at (if null, random node will be chosen by balancer).
  `clientCfg` -
Returns:
  Task result.
Throws:
  `GridClientException` - If failed to execute task.

#### executeTask

    public static <R> R executeTask(GridClient client,
                                    Class<? extends ComputeTask<?,R>> taskCls,
                                    Object taskArgs,
                                    GridClientConfiguration clientCfg)
                             throws GridClientException

Parameters:
  `client` - Client.
  `taskCls` - Task class.
  `taskArgs` - Task arguments.
  `clientCfg` - Client configuration.
Returns:
  Task result.
Throws:
  `GridClientException` - If failed to execute task.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.1
Release Date | : May 21 2020