ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nragon <nuno.goncal...@wedotechnologies.com>
Subject Re: Wait till the cache loading is complete before querying through ignite client
Date Fri, 07 Apr 2017 11:53:23 GMT
Hi,


I have a similiar use case, in mine i used IgniteCountDownLatch like
vkulichenko mentioned
Ignite ignite = IgniteClient.ignite();
      IgniteCountDownLatch latch =
ignite.countDownLatch(this.cacheConfig.getName() + "-loadlatch", 1, false,
true);
      if (!cacheExists(ignite)) {
        ignite.getOrCreateCache(this.cacheConfig);
        load(ignite);
        latch.countDown();
      }
      latch.await();
      this.cache = ignite.getOrCreateCache(this.cacheConfig);



--
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-tp9643p11809.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message