Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleClientCompute
public interface ClientCompute {
    public ClientClusterGroup clusterGroup();
    // Sync and async task execution methods.
    public <T, R> R execute(String taskName, @Nullable T arg) throws ClientException, InterruptedException;
    public <T, R> ClientFuture<R>Future<R> executeAsync(String taskName, @Nullable T arg) throws ClientException;
    // ClientCompute modificators.
    public ClientCompute withTimeout(long timeout);
    public ClientCompute withNoFailover();
    public ClientCompute withNoResultCache();
}

Async execution methods should return Future. Using this Future users can get task results or cancel the task. It's proposed to create a new Future interface for java thin client because get() method should be marked as throwing ClientException, but existing IgniteFuture throws IgniteException instead. The same approach is used for binary-rest client. Proposed new ClientFuture interface:

...

languagejava
titleClientFuture

...

Risks and Assumptions

If blocking IO is used (as in java thin client, for example) it's impossible to implement async operations without dedicated for each channel thread to process incoming messages. So, the count of threads on the client-side will be increased and can be raised dramatically if partition awareness functionality with a lot of server connections is used.

...