ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piubelli, Manuel " <manuel.piube...@citi.com>
Subject Local mode recommended setup
Date Tue, 16 Aug 2016 10:14:31 GMT
Hi All,

I am trying to setup a cluster in Local Mode: all my data fits in RAM and operations are read
only , data is loaded from a cache or disk at startup. I have a very simple question:

How can I configure some code to be run at startup of every node? When defining an own start
class the ignite node expectedly stops after loading the cache? Is there any stayAlive() method
or similar I can execute on the ignite or cluster object?

Sample Code:

public static void main(String[] args) throws URISyntaxException, IOException {
              Ignition.setClientMode(false);

              try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
                     IgniteCache<String, FullOrd> cache = FullOrdCacheLoader.getCacherLoader().loadAndGetCache();
                     // load complete, now stay alive to receive client requests
              }
}

Much appreciated,
Manuel

Mime
View raw message