org.apache.tamaya.mutableconfig

## Interface ChangePropagationPolicy

-     public interface ChangePropagationPolicy

  Policy that defines how changes are applied to the available `MutablePropertySource` instances, e.g.
  - ALL: Changes are propagated to all `MutablePropertySource` instances in order of significance. This means that a key added, updated or removed in each instance, if the key is writable/removable.
  - SIGNIFICANT_ONLY: A change (creation, update) is only applied, if
    1. the value is not provided by a more significant read-only property source.
    2. there is no more significant writable property source, which supports writing a g iven key.
    In other words a added or updated value is written exactly once to the most significant writable property source, which accepts a given key. Otherwise the change is discarded.
  - NONE: Do not apply any changes.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyChange(Collection<org.apache.tamaya.spi.PropertySource> propertySources, UUID transactionID, String key, String value)` Method being called when a single key/value pair has been added or updated.
    `void` | `applyChanges(Collection<org.apache.tamaya.spi.PropertySource> propertySources, UUID transactionID, Map<String,String> changes)` Method being called when a multiple key/value pairs are added or updated.
    `void` | `applyRemove(Collection<org.apache.tamaya.spi.PropertySource> propertySources, UUID transactionID, String... keys)` Method being called when a multiple keys has been removed from the configuration.

- - ### Method Detail

    - #### applyChanges

          void applyChanges(Collection<org.apache.tamaya.spi.PropertySource> propertySources,
                          UUID transactionID,
                          Map<String,String> changes)

      Method being called when a multiple key/value pairs are added or updated.
      Parameters:
        `propertySources` - the property sources, including readable property sources of the current configuration, never null.
        `transactionID` - the transaction ID, not null.
        `changes` - the key/values being added or updated, not null.

    - #### applyChange

          void applyChange(Collection<org.apache.tamaya.spi.PropertySource> propertySources,
                         UUID transactionID,
                         String key,
                         String value)

      Method being called when a single key/value pair has been added or updated.
      Parameters:
        `propertySources` - the property sources, including readable property sources of the current configuration, never null.
        `transactionID` - the transaction ID, not null.
        `key` - the key, not null.
        `value` - the value, not null.

    - #### applyRemove

          void applyRemove(Collection<org.apache.tamaya.spi.PropertySource> propertySources,
                         UUID transactionID,
                         String... keys)

      Method being called when a multiple keys has been removed from the configuration.
      Parameters:
        `propertySources` - the property sources, including readable property sources of the current configuration, never null.
        `transactionID` - the transaction ID, not null.
        `keys` - the keys being removed, not null.

Copyright © 2014–2016 Apache Software Foundation. All rights reserved.