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