Hi,

Please properly subscribe to the mailing list so that the community can
receive email notifications for your messages. To subscribe, send empty
email to [email protected] and follow simple instructions in
the reply.


pmazumdar wrote
> I have a cache loader job that puts data into ignite cache and I have an
> ignite client which queries this server to get the count of data using sql
> query. Now if the client is run while data loading is in progress, it
> fires query on the data loaded till then which is obvious. But what I want
> client to do is to wait till the cache is completely loaded and then run
> the query. Is this possible through code or is there any way to stop
> client to fire query at the time of data loading? It takes around 2 mins
> to load cache in my case.

There is no such thing out of the box, but it sounds like you can use
IgniteCountDownLatch to synchronize data loading and query execution
processes. Data loading part will use countDown() to indicate that it's
finished, while query execution will use await() to make sure query is not
executed too early.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Wait-till-the-cache-loading-is-complete-before-querying-through-ignite-client-tp9643p9651.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to