You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Sergey Evdokimov <se...@gridgain.com> on 2015/04/22 11:39:06 UTC

Setters in CacheConfiguration and IgniteConfiguration

Hello,

Setters in org.apache.ignite.configuration.CacheConfiguration return void,
may be they should return instance of CacheConfiguration (return this) to
allow create CacheConfiguration by chain call of setters. For example:
CacheConfiguration cfg = new
CacheConfiguration().setBackups(1).setCacheMode(REPLICATED);

javax.cache.configuration.MutableConfiguration uses same approach, all
setters return "this".

Does anyone have any objections?

Re: Setters in CacheConfiguration and IgniteConfiguration

Posted by Dmitriy Setrakyan <ds...@apache.org>.
I like the idea!

On Wed, Apr 22, 2015 at 4:39 AM, Sergey Evdokimov <se...@gridgain.com>
wrote:

> Hello,
>
> Setters in org.apache.ignite.configuration.CacheConfiguration return void,
> may be they should return instance of CacheConfiguration (return this) to
> allow create CacheConfiguration by chain call of setters. For example:
> CacheConfiguration cfg = new
> CacheConfiguration().setBackups(1).setCacheMode(REPLICATED);
>
> javax.cache.configuration.MutableConfiguration uses same approach, all
> setters return "this".
>
> Does anyone have any objections?
>