Thanks Denis.

I would try this approach. I expect Ignite node can be stopped and started
again in same jvm. In this listener, I would incorporate ignite.stop
(having ignite initially configured with lifecycle bean which would react
to stop event and flush any pending cache to db via store).

On Sep 10, 2016 10:43 AM, "Denis Magda" <[email protected]> wrote:

Set MAIN_CLASS environment variable referring to your class with Java’s
main method and execute ignite.sh. Your class needs to have the following
code snippet in order to process a segmentation event


ignite.events().localListen(new IgnitePredicate<Event>() {
    @Override public boolean apply(Event event) {
        System.out.println("Execute custom logic...");

        return true;
    }
}, EventType.EVT_NODE_SEGMENTED);

—
Denis

On Sep 9, 2016, at 9:12 PM, Anmol Rattan <[email protected]> wrote:

I take that point. However, for custom scripts, is there a way to listen to
segmentation event (please share name)  and only from local node (local
listener?) and in response to that event we could initialize beans or
invoke our process.

On Sep 10, 2016 3:24 AM, "vkulichenko" <[email protected]>
wrote:

> Hi,
>
> You should use ignite.sh script shipped with Ignite to support this mode.
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.705
> 18.x6.nabble.com/Segmentation-policy-tp7635p7639.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com
> <http://nabble.com>.
>

Reply via email to