You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by "Anatole Tresch (JIRA)" <ji...@apache.org> on 2016/08/26 14:52:20 UTC

[jira] [Resolved] (TAMAYA-171) Simplify API for mutability

     [ https://issues.apache.org/jira/browse/TAMAYA-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anatole Tresch resolved TAMAYA-171.
-----------------------------------
    Resolution: Implemented

Including adaptions on etcd and consul modules.

> Simplify API for mutability
> ---------------------------
>
>                 Key: TAMAYA-171
>                 URL: https://issues.apache.org/jira/browse/TAMAYA-171
>             Project: Tamaya
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 0.2-incubating
>            Reporter: Anatole Tresch
>            Assignee: Anatole Tresch
>             Fix For: 0.3-incubating
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The current API for MutableConfiguration, especially on the SPI side with {{MutableProeprtySource}} is much too complex. It would be better to just add the following methods/interfaces:
> {noformat}
> public interface MutablePropertySource extends PropertySource {
>     void applyChange(ConfigChangeRequest configChange);
> }
> public interface MutableConfiguration extends Configuration {
>     MutableConfiguration put(String key, String value);
>     MutableConfiguration putAll(Map<String, String> properties); 
>     MutableConfiguration remove(Collection<String> keys);
>     MutableConfiguration remove(String... keys);
>     void store();
>     ChangePropagationPolicy getChangePropagationPolicy();
>     ConfigChangeRequest getConfigChangeRequest();
> }
> {noformat}
> Hereby a mutable instance can be accessed from the provider:
> {noformat}
> MutableConfiguration cfg = MutableConfigurationProvider
>   .createMutableConfiguration(ConfigurationProvider.getConfiguration());
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)