Stanislav, thank you for reply!

As a result of discussion, I propose the following plan:
1) Create the new method getCacheConfiguration(String cacheName) for ignite
2.8+ version, which will return the cache template or the cache
configuration.
2) Create the new ticket about changing method names and adding new
property for storing cache templates for ignite 3+ version.

Any comments or additions?

Thank you,
Sergey

чт, 14 февр. 2019 г. в 17:18, <stanlukya...@gmail.com>:

> Sergey, Ed,
> On method naming/deprecation/etc.
> I would actually like the new method to work for both templates and
> regular caches.
> For templates it would return a copy of the template.
> For existing caches it would return a copy of the cache configuration.
> In other words, it would be a shortcut for
>     `new
> CacheConfiguration(ignite.cache("foo").configuration(CacheConfiguration.class))`
> I wouldn't expect it to be widely used but I think this adds some
> uniformity to the behavior.
>
> Ilya,
> On asterisk usage.
> If you have a cache config "foo*" in your static cache configurations
> then you will be able to get that configuration via
> `ignite.cacheConfiguration("foo")` (no asterisk).
> Asterisk is being dropped when the template is created. This is how it
> works now, no changes here.
>
> All,
> Regarding reshuffling all this in 3.0.
> I would
> - change method name  addCacheConfiguration to addCacheTemplate
> - would add a new property `CacheConfiguration[] cacheTemplates` to put
> templates to - instead of putting them
> into `cacheConfigutations` with an asterisk
>
> But that's a different topic, I think.
>
> Thanks,
> Stan
>
> > -----Original Message-----
> > From: Ilya Kasnacheev <ilya.kasnach...@gmail.com>
> > Sent: Thursday, February 14, 2019 3:32 PM
> > To: dev@ignite.apache.org
> > Subject: Re: [DISCUSSION] [IGNITE-11141] The new java method to create a
> > cache from a template
> >
> > Hello!
> >
> > What about existing convention of using asterisk to mark templates? How
> > does it integerate with this one?
> >
> > Regards,
> > --
> > Ilya Kasnacheev
> >
> >
> > чт, 14 февр. 2019 г. в 13:04, Sergey Moldachev
> > <sergeymoldac...@gmail.com>:
> >
> > > Sounds good, I agree with naming and marking *addCacheConfiguration*
> > method
> > > as deprecated with replacing on *addCacheConfigurationTemplate*.
> > >
> > > Stanislav, could you please look at this?
> > >
> > > Thank you,
> > > Sergey
> > >
> > > чт, 14 февр. 2019 г. в 01:49, Eduard Shangareev <
> > > eduard.shangar...@gmail.com
> > > >:
> > >
> > > > CacheConfiguration cfg = ignite.cacheConfiguration("myTemplate");
> > > > cfg.setName("myCacheFromTemplate");
> > > > ignite.createCache(cfg);
> > > >
> > > > Ok, I got it. We already have addCacheConfiguration and
> > > cacheConfiguration
> > > > should be a getter-like counterpart for it.
> > > >
> > > > So, I would suggest deprecating this addCacheConfiguration method and
> > add
> > > > new one Ignite.addCacheTemplate and its counterpart
> > getCacheTemplate.
> > > > Because cacheConfiguration looks very weird, I would expect that it
> > > should
> > > > return cache configuration for any given cache name.
> > > >
> > > >
> > > > Thoughts?
> > > >
> > > >
> > > > On Thu, Feb 14, 2019 at 12:01 AM Sergey Moldachev <
> > > > sergeymoldac...@gmail.com>
> > > > wrote:
> > > >
> > > > > Hi, Eduard, thank you for your reply!
> > > > >
> > > > > You can find example and full description in the Jira task
> > > > > <https://issues.apache.org/jira/browse/IGNITE-11141>. Also you can
> > > find
> > > > > simple implementation in comments.
> > > > >
> > > > > Thank you,
> > > > > Sergey!
> > > > >
> > > > > + update subject (fixed a typo)
> > > > >
> > > > > ср, 13 февр. 2019 г. в 19:55, Eduard Shangareev <
> > > > > eduard.shangar...@gmail.com
> > > > > >:
> > > > >
> > > > > > Hi, Sergey!
> > > > > >
> > > > > > Could you give some example of how it is supposed to use?
> > > > > >
> > > > > > On Wed, Feb 13, 2019 at 6:02 PM Sergey Moldachev <
> > > > > > sergeymoldac...@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > Hi, Igniters!
> > > > > > >
> > > > > > > I want to add the new java method *cacheConfiguration(String
> > > > > cacheName)*
> > > > > > in
> > > > > > > to *Ignite* core interface as part of the task
> > > > > > > https://issues.apache.org/jira/browse/IGNITE-11141.
> > > > > > >
> > > > > > > I'll be glad to see the comments about this feature.
> > > > > > >
> > > > > > > Thank you,
> > > > > > > Sergey
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
>
>

Reply via email to