Configuration Injection

Users want to be able to polulate configured items by injecting configured values. Hereby

  • the lifecycle of the instances is not managed by Tamaya

  • all references to items configured are managed as weak references, to prevent memoryleaks.

  • Injection should if possible evaluate the properties by defaults. Even properties without any annotations are possible.

  • Users expect to exclude certain properties from calculation

  • Beside injection of properties it is also possible to call setter methods with one parameter similarly.

  • Basically injection is performed, when the instance is passed to the Tamaya configuration system. It should also be possible to inject/provide final values, especially Strings. Changes on configured values should be reflected in the current value. Setters methods similarly can be called again, with the new values, on changes.

  • Users expect to control dynamic values and recall of setter methods, basically the following strategies should be supported:

    • inject only once and ignore further changes.

    • reinject/reinitialize on each change

  • Dynamic Values can easily be modeled as ConfiguredValue instances, which should have the following functionality:

    • access the current value

    • access the new value

    • access the latest value access time in ms

    • access the latest value update time in ms

    • evaluate easily if the value has changed since the last access

    • accept the change

      • as a shortcut it should be possible to accept the change on access of the value implicitly, hereby always accessing the latest valid value.

    • ignore the change

    • register Consumer<DynamicValue> liasteners to listen on the changes (ans also removing them later again).

All observing functionality can be done completely asynchronously and in parallel.