Setters in CacheConfiguration and IgniteConfiguration

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Setters in CacheConfiguration and IgniteConfiguration

Sergey Evdokimov
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?
Reply | Threaded
Open this post in threaded view
|

Re: Setters in CacheConfiguration and IgniteConfiguration

dsetrakyan
I like the idea!

On Wed, Apr 22, 2015 at 4:39 AM, Sergey Evdokimov <[hidden email]>
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?
>