ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: Wait for nodes to join the cluster
Date Fri, 19 Feb 2016 22:06:38 GMT
Hi Paolo,

You can register a discovery event listener and check the topology size
there:

ignite.events().localListen(new IgnitePredicate<Event>() {
    @Override public boolean apply(Event event) {
        if (ignite.cluster().nodes().size() >= 10) {
            // GO!
        }

        return true;
    }
}, EventType.EVT_NODE_JOINED);

Note that it's better to run execution asynchronously in this case, not to
block the Ignite's internal thread that processes events.

Let me know if this helps.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Wait-for-nodes-to-join-the-cluster-tp3103p3104.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message