-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AtomicInteger and AtomicLong converter #406
Comments
Is this a real-world requirement or an idea? I think normally we'd want to discourage conversion to classes expressly designed for concurrent mutability. |
In Open Liberty, we have some apps using this and we offer our end users in our own implementation in the past. From now on, we plan to consume SmallRye Config and would like to maintain the capabilities. Besides, I don't see the drawback you mentioned as the type clearly specify the type though. By the way, Archaius Config supports this converter as well. |
I'm wondering if we should try to keep the core "clean" with just the most common converters and add another module with other type of converters. We already have a submodule for this reason and the truth is that the great majority of users probably won't use these type of converters. For Liberty, you could just add the extra dependency. |
Sounds good! Which submodule are you referring to? I am thinking about SPI so that the consumer can provide more converters if they need. |
In here: Anyway, as you remember, I was trying to work on an external Converters project, to maybe even propose as spec, so this may be one more reason to separate the code. |
ah, I see. These converters will be like application provided converters and use service loader patter to be loaded. |
Yes :) |
As a developer, I would like to have the out of box converters for AtomicInteger and AtomicLong so that I can directly convert a string to these types. I can do the following without doing anything else.
config.getValue("atomic.integer.prop", AtomicInteger.class)
config.getValue("atomic.long.prop", AtomicLong.class)
The text was updated successfully, but these errors were encountered: