コード例 #1
0
 @Override
 public boolean hasChanged(Settings current, Settings previous) {
   return current
           .filter(loggerPredicate)
           .getAsMap()
           .equals(previous.filter(loggerPredicate).getAsMap())
       == false;
 }
コード例 #2
0
 @Override
 public Settings getValue(Settings current, Settings previous) {
   Settings.Builder builder = Settings.builder();
   builder.put(current.filter(loggerPredicate).getAsMap());
   for (String key : previous.getAsMap().keySet()) {
     if (loggerPredicate.test(key) && builder.internalMap().containsKey(key) == false) {
       if (ESLoggerFactory.LOG_LEVEL_SETTING.getConcreteSetting(key).exists(settings) == false) {
         builder.putNull(key);
       } else {
         builder.put(
             key, ESLoggerFactory.LOG_LEVEL_SETTING.getConcreteSetting(key).get(settings));
       }
     }
   }
   return builder.build();
 }