[infinispan-dev] boolean properties in config

Mircea Markus mircea.markus at jboss.com
Sun Dec 11 21:45:16 EST 2011


On 10 Dec 2011, at 10:04, Pete Muir wrote:

> https://issues.jboss.org/browse/ISPN-1474
> 
> Currently we do a mix of:
> 
> enableXXX()
> disableXXX()
> enabled(boolean b)
> XXX(boolean b)
> 
> where XXX is something to enable or disable (e.g. purgeOnStartup). We also the scatter the word use around in a very inconsistent fashion.
this is a bit ugly indeed
> 
> I would like to rationalise this, and would propose that every boolean has:
> 
> enableXXX
> disableXXX
> xxxEnabled(boolean b)
> 
> The former 2 are nice for hardcoded config, the latter is nice when you are adapting one format to another (e.g. Paul).
I think this would be much more readable. My only comment is that we allow two ways of doing the same thing, which might be slightly confusing for the users. Also the easiness of migration from old to new configuration is important, but IMO not as important to make the new config simple.
> 
> I would deprecate the usage of XXX(boolean b) and useXXX(boolean b) and remove in 6.
> 
> Thoughts?
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev




More information about the infinispan-dev mailing list