Skip to content
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

2.x polled dynamic properties for typesafe #463

Open
linkcrux opened this issue Nov 3, 2016 · 0 comments
Open

2.x polled dynamic properties for typesafe #463

linkcrux opened this issue Nov 3, 2016 · 0 comments
Labels

Comments

@linkcrux
Copy link

linkcrux commented Nov 3, 2016

In 1.x, we have a generic scheduler that can be configured with any PolledConfigurationSource, like TypesafeConfigurationSource to achieve dynamic properties :

FixedDelayPollingScheduler scheduler = new FixedDelayPollingScheduler(0, 10, false);
TypesafeConfigurationSource typesafeSource = new TypesafeConfigurationSource() {
    @Override
    protected Config config() {
    	return ConfigFactory.parseResourcesAnySyntax("override");
    }
};
DynamicConfiguration configuration = new DynamicConfiguration(typesafeSource, scheduler);
DynamicPropertyFactory.initWithConfigurationSource(configuration);

However, I don't see such a dynamic property implement for Typesafe in 2.x. As per the documentation, PollingDynamicConfig is supposed to be used, but I don't see any polling support provided in the TypesafeConfigReader, only URLConfigReader supports polling. In 2.x, is dynamic property supported for URL based properties only ?

    URLConfigReader implements Callable<PollingResponse>

If am missing something, can someone kindly provide an 2.x example how I can achieve dynamic config using typesafe ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants