Skip to content

Instantly share code, notes, and snippets.

@struberg
Created March 9, 2017 15:45
Show Gist options
  • Save struberg/eec6ed5f9769ba1d46ace812f863ad5f to your computer and use it in GitHub Desktop.
Save struberg/eec6ed5f9769ba1d46ace812f863ad5f to your computer and use it in GitHub Desktop.
ConfigValue<Integer> port = config.resolve("myUrl)
.as(Integer.class)
.cacheFor(5,TimeUnit.Seconds)
.notifyOnChange(::somemethod);
...
port.get();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment