Perfect!! You saved me! Thanks, F.D.
On Tue, Jul 31, 2018 at 4:05 PM Dmitriy Govorukhin < [email protected]> wrote: > HI, > > Yes, you can. Try to do something like this > > ignite.compute().call(() -> { > // Get local ignite instance (local in compute task). > Ignite remoteIg = Ignition.localIgnite(); > > IgniteCache<Object, Object> cache = remoteIg.cache("cacheName"); > > Object val = cache.get("someKey"); > > return "result"; > }); > > or use @IgniteInstanceResource. > > ignite.compute().call(new MyComputeTask()); > > class MyComputeTask implements IgniteCallable<Object> { > @IgniteInstanceResource > private Ignite ignite; > > @Override public Object call() throws IgniteCheckedException { > > IgniteCache<Object, Object> cache = remoteIg.cache("cacheName"); > > Object val = cache.get("someKey"); > > return "result"; > } > } > > > > On Tue, Jul 31, 2018 at 4:50 PM F.D. <[email protected]> wrote: > >> Hi, >> >> First, I want sat thank you for your job, and for the help you gave me. >> I've a new question for you. I need to get a cache value inside the method >> Call of my closure. Is it possibile? I need to start a new node?!? (ignite >> = Ignition::Start(cfg)) Can I use an already initialized variable?!? >> >> Thanks, >> F.D. >> >
