How can i get igniteCache data with timeout?

classic Classic list List threaded Threaded
2 messages Options
Jone Zhang Jone Zhang
Reply | Threaded
Open this post in threaded view
|

How can i get igniteCache data with timeout?

I'm looking forward to use ignite as below:
IgniteCache icache = ...
icache .get(key1, timeout)
...
icache .get(keyn, timeout)

Unfortunately it is no way.
How can i get igniteCache data with timeout?

Best Wishes.
Thanks.
Alexei Scherbakov Alexei Scherbakov
Reply | Threaded
Open this post in threaded view
|

Re: How can i get igniteCache data with timeout?

Hi,

You can use withAsync Ignite's feature.

Basic usage:

IgniteCache cache= ignite.cache(null).withAsync();
cache.get(key);
cache.future().get(timeout)

By default where is a limitation on max async operations to prevent system overload, 
which is defined by CacheConfiguration.setMaxConcurrentAsyncOperations
More info here [1]


2016-06-15 6:41 GMT+03:00 Jone Zhang <[hidden email]>:
I'm looking forward to use ignite as below:
IgniteCache icache = ...
icache .get(key1, timeout)
...
icache .get(keyn, timeout)

Unfortunately it is no way.
How can i get igniteCache data with timeout?

Best Wishes.
Thanks.



--

Best regards,
Alexei Scherbakov