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:47:21 UTC
[jira] [Created] (TAMAYA-171) Simplify API for mutability
Anatole Tresch created TAMAYA-171:
-------------------------------------
Summary: 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
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)