Your thoughts are right. If cache exists no PME will be started. If doesn't exist - getOrCreate() method will create it and start PME, cache() method will throw an exception or return null (doesn't remember what exactly)
пт, 11 дек. 2020 г. в 17:48, VeenaMithare <v.mith...@cmcmarkets.com>: > HI Pavel, > > Thank you for the reply. > > >>> *for the end user , is this invoked when we do ignite.getOrCreate( xx ) > and ignite.cache(xx )* > > >>Yes. > > > getOrCreateCache would create a cache if doesnt exist . I would guess this > would have the effect of starting the cache if doesnt exist . And I think > this would start the PME. > > And ignite.cache would only get an instance of the existing cache. In this > case, I would imagine the cache already exists and a reference to the cache > is returned. I would have thought this WOULD NOT have the effect of > starting > the cache and hence should not start the PME. > > Please guide. Below is the documentation of getOrCreateCache and > ignite.cache from the javadocs. > > getOrCreateCache(CacheConfiguration<K,V> cacheCfg) > Gets existing cache with the given name or creates new one with the given > configuration. > > <K,V> IgniteCache<K,V> cache(String name) > throws javax.cache.CacheException > Gets an instance of IgniteCache API. IgniteCache is a fully-compatible > implementation of JCache (JSR 107) specification. > > regards, > Veena. > > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >