On Tue, Jan 27, 2015 at 8:21 AM, Sergey Evdokimov <[email protected]>
wrote:

> Guys,
>
> IMHO Name of method IgniteAsyncSupport.enableAsync() is unclear, because
> calling of "cache.enableAsync()" does not ENABLE async mode on the 'cache'
> instance, it returns another instance with async mode enabled. May be
> enableAsync() should be renamed to something like 'withAsync()'?
>

I agree. It is more consistent with other withXXX() methods. Sergey E.,
feel free to rename it (I would also create a ticket for it).


>
> Also I think that it would be good to support code like this:
>
> cache.withAsync().put(key, value);
> Future fut = cache.future();
>

Disagree. I think the above is confusing. It is also not consistent with
other withXXX() methods.


>
> looks, in that code we must not call cache.withAsync() in second like,
> future can be obtain from 'cache' instance. Now that code
> throws IllegalStateException on "cache.future()" because 'cache' in not in
> async mode.
>

Reply via email to