Hello!

It is stopped because it is created in try-with-resources block. It is
closed when try-block is exited.

The equivalent code is
 IgnitePredicate<TaskEvent> lsnr = new IgnitePredicate() {
    public boolean apply(TaskEvent e) { ... }
}

Regards,

-- 
Ilya Kasnacheev

2018-07-16 14:59 GMT+03:00 monstereo <[email protected]>:

> thanks,
> I am looking for some features about ignite for my case  and I am stuck
> with
> this code:
> Event Example Github Ignite
> <https://github.com/apache/ignite/blob/master/examples/
> src/main/java/org/apache/ignite/examples/events/EventsExample.java>
>
> In this example works fine, but why ignite node is stopped even if started
> in main?
>
> And what is the equivalent of this code without using "->" this
>
>  IgnitePredicate<TaskEvent> lsnr = evt -> {
>             System.out.println("Received task event [evt=" + evt.name() +
> ",
> taskName=" + evt.taskName() + ']');
>
>             return true; // Return true to continue listening.
>         };
>
>         // Register event listener for all local task execution events.
> ignite.events().localListen(lsnr, EVTS_TASK_EXECUTION);
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Reply via email to