You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Vladimir Ershov (JIRA)" <ji...@apache.org> on 2015/11/30 10:05:10 UTC

[jira] [Created] (IGNITE-2031) Add the possibility to adress local ignite instance inside lambda.

Vladimir Ershov created IGNITE-2031:
---------------------------------------

             Summary: Add the possibility to adress local ignite instance inside lambda.
                 Key: IGNITE-2031
                 URL: https://issues.apache.org/jira/browse/IGNITE-2031
             Project: Ignite
          Issue Type: Improvement
    Affects Versions: 1.6
            Reporter: Vladimir Ershov
            Assignee: Vladimir Ershov
            Priority: Minor


Ignition.currentIgnite method is needed for case, when there is no Ignite instance available around the closure. 
So, this ticket is aimed to support syntax like this:

{code:java}
        cfg.setLifecycleBeans((LifecycleEventType evt)  -> {
                if (evt == LifecycleEventType.AFTER_NODE_START) {
                    log.info("Load cache: " + Ignition.currentIgnite().name());

                    Ignition.currentIgnite().cache(null).loadCache(null, 0);

                    log.info("Cache loaded: " + Ignition.currentIgnite().name());
                }
        });
{code}

Plus tests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)