Oh, I see now what you mean, IGNITE-1018 has escaped my view. Then, until
IGNITE-1018 is fixed, the only guaranteed approach is to wait on a CDL.
Here is the pseudo-code that I have in mind:

LifecycleBean or after Ignition.start():
// Populate your node local map
....

CountDownLatch init = nlm.get(INIT_KEY);

if (init == null) {
    CountDownLatch old = nlm.putIfAbsent(INIT_KEY, init = new
CountDownLatch(1));

    if (old != null)
        init = old;
}

init.countDown();


EntryProcessor:

CountDownLatch init = nlm.get(INIT_KEY);

if (init == null) {
    CountDownLatch old = nlm.putIfAbsent(INIT_KEY, init = new
CountDownLatch(1));

    if (old != null)
        init = old;
}

init.await();

// Run entry procesor


This approach has only one restriction - you should not call any cache
operations on the started node before you release the latch, otherwise
this may lead to a distributed deadlock.

Hope this helps!

AG

Reply via email to