[infinispan-issues] [JBoss JIRA] Commented: (ISPN-911) Simplify configuration with fluent API
Vladimir Blagojevic (JIRA)
jira-events at lists.jboss.org
Tue Mar 22 10:10:47 EDT 2011
[ https://issues.jboss.org/browse/ISPN-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589658#comment-12589658 ]
Vladimir Blagojevic commented on ISPN-911:
------------------------------------------
Add your notes and wish list here Galder! I forgot the details by now.
> Simplify configuration with fluent API
> --------------------------------------
>
> Key: ISPN-911
> URL: https://issues.jboss.org/browse/ISPN-911
> Project: Infinispan
> Issue Type: Feature Request
> Components: Configuration
> Affects Versions: 5.0.0.ALPHA2
> Reporter: Vladimir Blagojevic
> Assignee: Galder Zamarreño
> Fix For: 5.0.0.FINAL
>
>
> As is, it is rather tedious sometimes to set every little configuration toggle using coarse APIs like GlobalConfiguration or Configuration. We could simplify this model and allow users to set related "units" of configuration using more "grouped" APIs as:
> {code}
> class GlobalConfiguration {
> MarshallerBuilder configureMarshaller();
> }
>
> class MarshallerBuilder {
> MarshallerBuilder setInstance(Marshaller m);
> MarshallerBuilder setType(Class<? extends Marshaller> c);
> MarshallerBuilder setVersion(String s);
> MarshallerBuilder addProperty(String name, String value);
>
> MarshallerBuilder addProperties(Properties p);
> }
> {code}
> And on top if we can use fluent API to make configuration setting even easier:
> {code}
> globalConf.configureMarshaller().setType(MyMarshaller.class).addProperty("foo", "bar").setVersion("5.0");
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list