Skip to content

Commit

Permalink
Merge pull request apolloconfig#571 from nobodyiam/refactor-demo
Browse files Browse the repository at this point in the history
simplify demo
  • Loading branch information
nobodyiam authored Mar 24, 2017
2 parents e747189 + 498a12e commit 180e101
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,8 @@ public void setBatch(int batch) {
@ApolloConfigChangeListener("application")
private void someChangeHandler(ConfigChangeEvent changeEvent) {
logger.info("[someChangeHandler]Changes for namespace {}", changeEvent.getNamespace());
for (String key : changeEvent.changedKeys()) {
ConfigChange change = changeEvent.getChange(key);
logger.info("[someChangeHandler]Change - key: {}, oldValue: {}, newValue: {}, changeType: {}",
change.getPropertyName(), change.getOldValue(), change.getNewValue(),
change.getChangeType());
if (key.equals("timeout")) {
refreshTimeout();
}
if (changeEvent.isChanged("timeout")) {
refreshTimeout();
}
}

Expand Down

0 comments on commit 180e101

Please sign in to comment.