reflection based toProperties() proposal (based on config normalizer used in PerfRepo reports)
https://github.com/mlinhard/infinispan/tree/t_flatconfig_reflection On 11/19/2013 07:37 PM, Mircea Markus wrote: > On Nov 19, 2013, at 4:39 PM, Dan Berindei <[email protected]> wrote: > >> I think the properties format is too closely tied to your particular use >> case - in general having a long prefix on every line would actual settings >> harder to see than in a structured format like XML/JSON/YAML, not easier. >> And if the cache name is repeated on every line, you can't easily compare >> the configuration of two nodes or of two caches - all the lines would be >> different. >> >> I'm also not sure about implementing >> toProperties()/append(StringBuilder)/etc. in every configuration class >> instead of using reflection. We already have a lot of changes to make when >> we add/modify a setting, I'd rather not make that even harder than it is. > +1. I think an reflection based approach (toProperties implemented in the > base config class and iterating over all defined fields) should be easy to > implement and solve the problem . > > Cheers, -- Michal Linhard Quality Assurance Engineer JBoss Datagrid Red Hat Czech s.r.o. Purkynova 99 612 45 Brno, Czech Republic phone: +420 532 294 320 ext. 8262320 mobile: +420 728 626 363 _______________________________________________ infinispan-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/infinispan-dev
