Package org.apache.ignite.client
Interface ClientCompute
- 
 public interface ClientComputeThin client compute facade. Defines compute grid functionality for executing tasks over nodes in theClientClusterGroup
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ClientClusterGroupclusterGroup()Gets cluster group to which thisClientComputeinstance belongs.<T,R>
 Rexecute(String taskName, T arg)Executes given task within the cluster group.<T,R>
 Future<R>executeAsync(String taskName, T arg)Deprecated.UseexecuteAsync2(String, Object)instead.<T,R>
 IgniteClientFuture<R>executeAsync2(String taskName, T arg)Executes given task asynchronously within the cluster group.ClientComputewithNoFailover()Sets no-failover flag for tasks executed by returnedClientComputeinstance.ClientComputewithNoResultCache()Disables result caching for tasks executed by returnedClientComputeinstance.ClientComputewithTimeout(long timeout)Sets timeout for tasks executed by returnedClientComputeinstance.
 
- 
- 
- 
Method Detail- 
clusterGroupClientClusterGroup clusterGroup() Gets cluster group to which thisClientComputeinstance belongs.- Returns:
- Cluster group to which this ClientComputeinstance belongs.
 
 - 
execute<T,R> R execute(String taskName, @Nullable T arg) throws ClientException, InterruptedException Executes given task within the cluster group. For step-by-step explanation of task execution process refer toComputeTaskdocumentation.- 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.
- Throws:
- ClientException- If task failed.
- InterruptedException- If the wait for task completion was interrupted.
- See Also:
- for information about task execution.
 
 - 
executeAsync@Deprecated <T,R> Future<R> executeAsync(String taskName, @Nullable T arg) throws ClientException Deprecated.UseexecuteAsync2(String, Object)instead. This method callsexecuteAsync2(String, Object)internally, but returns a more limited Future interface.Executes given task asynchronously within the cluster group. For step-by-step explanation of task execution process refer toComputeTaskdocumentation.- 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:
- A Future representing pending completion of the task.
- Throws:
- ClientException- If task failed.
- See Also:
- for information about task execution.
 
 - 
executeAsync2<T,R> IgniteClientFuture<R> executeAsync2(String taskName, @Nullable T arg) throws ClientException Executes given task asynchronously within the cluster group. For step-by-step explanation of task execution process refer toComputeTaskdocumentation.- 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:
- A Future representing pending completion of the task.
- Throws:
- ClientException- If task failed.
- See Also:
- for information about task execution.
 
 - 
withTimeoutClientCompute withTimeout(long timeout) Sets timeout for tasks executed by returnedClientComputeinstance.- Parameters:
- timeout- Task execution timeout.
- Returns:
- ClientComputeinstance with given timeout.
 
 - 
withNoFailoverClientCompute withNoFailover() Sets no-failover flag for tasks executed by returnedClientComputeinstance. If flag is set, job will be never failed over even if remote node crashes or rejects execution. SeeComputeTaskdocumentation for more information about jobs failover.- Returns:
- ClientComputeinstance with no-failover flag.
 
 - 
withNoResultCacheClientCompute withNoResultCache() Disables result caching for tasks executed by returnedClientComputeinstance. SeeComputeTaskdocumentation for more information tasks result caching.- Returns:
- ClientComputeinstance with "no result cache" flag.
 
 
- 
 
-