test_class.declarator: expectedLogEvents = new ExpectedLogEventsRule(Level.WARN)
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedLogEventsRule expectedLogEvents = new ExpectedLogEventsRule(Level.WARN);
test_class.type: ExpectedLogEventsRule
test_class.var_name: expectedLogEvents
test_class.declarator: directory = new File("target/test/dir-" + UUID.randomUUID())
test_class.modifier: private final
test_class.original_string: private final File directory = new File("target/test/dir-" + UUID.randomUUID());
test_class.type: File
test_class.var_name: directory
test_class.declarator: reloadTimes = new ArrayBlockingQueue<>(10)
test_class.modifier: private final
test_class.original_string: private final BlockingQueue<Instant> reloadTimes = new ArrayBlockingQueue<>(10);
test_class.type: BlockingQueue<Instant>
test_class.var_name: reloadTimes
test_class.declarator: observer = new ConfigObserver(directory, "testApp") {
          @Override
          public void updateConfiguration(Map<String, String> newConfiguration) {
              super.updateConfiguration(newConfiguration);
              try {
                  reloadTimes.put(Instant.now());
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          }
      }
test_class.modifier: private final
test_class.original_string: private final ConfigObserver observer = new ConfigObserver(directory, "testApp") {
          @Override
          public void updateConfiguration(Map<String, String> newConfiguration) {
              super.updateConfiguration(newConfiguration);
              try {
                  reloadTimes.put(Instant.now());
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          }
      };
test_class.type: ConfigObserver
test_class.var_name: observer
test_class.declarator: httpListenAddress
test_class.modifier: private
test_class.original_string: private InetSocketAddress httpListenAddress;
test_class.type: InetSocketAddress
test_class.var_name: httpListenAddress
test_class.declarator: dataSource
test_class.modifier: private
test_class.original_string: private DummyDataSource dataSource;
test_class.type: DummyDataSource
test_class.var_name: dataSource
test_class.declarator: daemonPollingInterval
test_class.modifier: private
test_class.original_string: private Duration daemonPollingInterval;
test_class.type: Duration
test_class.var_name: daemonPollingInterval
test_class.file: action-controller/src/test/java/org/actioncontroller/config/ConfigObserverTest.java
test_class.identifier: ConfigObserverTest
test_case.body: @Test
      public void shouldValidateRequiredValue() {
          AtomicReference<Credentials> credentials = new AtomicReference<>();
          expectedLogEvents.expectPattern(ConfigObserver.class, Level.ERROR, "Failed to notify listener while reloading {}");
          observer.onPrefixedValue("credentials", Credentials::new, credentials::set);
      }
test_case.class_method_signature: ConfigObserverTest.shouldValidateRequiredValue()
test_case.full_signature: @Test public void shouldValidateRequiredValue()
test_case.identifier: shouldValidateRequiredValue
test_case.invocations: expectPattern onPrefixedValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldValidateRequiredValue()
focal_class.declarator: logger = LoggerFactory.getLogger(ConfigObserver.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(ConfigObserver.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: currentConfiguration
focal_class.modifier: private
focal_class.original_string: private Map<String, String> currentConfiguration;
focal_class.type: Map<String, String>
focal_class.var_name: currentConfiguration
focal_class.declarator: listeners = new ArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final List<ConfigListener> listeners = new ArrayList<>();
focal_class.type: List<ConfigListener>
focal_class.var_name: listeners
focal_class.declarator: configLoader
focal_class.modifier: private final
focal_class.original_string: private final ConfigLoader configLoader;
focal_class.type: ConfigLoader
focal_class.var_name: configLoader
focal_class.file: action-controller/src/main/java/org/actioncontroller/config/ConfigObserver.java
focal_class.identifier: ConfigObserver
focal_class.class_method_signature: ConfigObserver.ConfigObserver(String applicationName)
focal_class.full_signature: public  ConfigObserver(String applicationName)
focal_class.identifier: ConfigObserver
focal_class.modifiers: public
focal_class.parameters: (String applicationName)
focal_class.signature:  ConfigObserver(String applicationName)
focal_class.class_method_signature: ConfigObserver.ConfigObserver(File configDirectory, String applicationName)
focal_class.full_signature: public  ConfigObserver(File configDirectory, String applicationName)
focal_class.identifier: ConfigObserver
focal_class.modifiers: public
focal_class.parameters: (File configDirectory, String applicationName)
focal_class.signature:  ConfigObserver(File configDirectory, String applicationName)
focal_class.class_method_signature: ConfigObserver.ConfigObserver(File configDirectory, String applicationName, List<String> profiles)
focal_class.full_signature: public  ConfigObserver(File configDirectory, String applicationName, List<String> profiles)
focal_class.identifier: ConfigObserver
focal_class.modifiers: public
focal_class.parameters: (File configDirectory, String applicationName, List<String> profiles)
focal_class.signature:  ConfigObserver(File configDirectory, String applicationName, List<String> profiles)
focal_class.class_method_signature: ConfigObserver.ConfigObserver(ConfigLoader configLoader)
focal_class.full_signature: public  ConfigObserver(ConfigLoader configLoader)
focal_class.identifier: ConfigObserver
focal_class.modifiers: public
focal_class.parameters: (ConfigLoader configLoader)
focal_class.signature:  ConfigObserver(ConfigLoader configLoader)
focal_class.class_method_signature: ConfigObserver.onConfigChange(ConfigListener listener)
focal_class.full_signature: public ConfigObserver onConfigChange(ConfigListener listener)
focal_class.identifier: onConfigChange
focal_class.modifiers: public
focal_class.parameters: (ConfigListener listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onConfigChange(ConfigListener listener)
focal_class.class_method_signature: ConfigObserver.onSingleConfigValue(String key, Function<String, T> transformer, T defaultValue, ConfigValueListener<T> listener)
focal_class.full_signature: public ConfigObserver onSingleConfigValue(String key, Function<String, T> transformer, T defaultValue, ConfigValueListener<T> listener)
focal_class.identifier: onSingleConfigValue
focal_class.modifiers: public
focal_class.parameters: (String key, Function<String, T> transformer, T defaultValue, ConfigValueListener<T> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onSingleConfigValue(String key, Function<String, T> transformer, T defaultValue, ConfigValueListener<T> listener)
focal_class.class_method_signature: ConfigObserver.onStringValue(String key, String defaultValue, ConfigValueListener<String> listener)
focal_class.full_signature: public ConfigObserver onStringValue(String key, String defaultValue, ConfigValueListener<String> listener)
focal_class.identifier: onStringValue
focal_class.modifiers: public
focal_class.parameters: (String key, String defaultValue, ConfigValueListener<String> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onStringValue(String key, String defaultValue, ConfigValueListener<String> listener)
focal_class.class_method_signature: ConfigObserver.onIntValue(String key, int defaultValue, ConfigValueListener<Integer> listener)
focal_class.full_signature: public ConfigObserver onIntValue(String key, int defaultValue, ConfigValueListener<Integer> listener)
focal_class.identifier: onIntValue
focal_class.modifiers: public
focal_class.parameters: (String key, int defaultValue, ConfigValueListener<Integer> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onIntValue(String key, int defaultValue, ConfigValueListener<Integer> listener)
focal_class.class_method_signature: ConfigObserver.onLongValue(String key, long defaultValue, ConfigValueListener<Long> listener)
focal_class.full_signature: public ConfigObserver onLongValue(String key, long defaultValue, ConfigValueListener<Long> listener)
focal_class.identifier: onLongValue
focal_class.modifiers: public
focal_class.parameters: (String key, long defaultValue, ConfigValueListener<Long> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onLongValue(String key, long defaultValue, ConfigValueListener<Long> listener)
focal_class.class_method_signature: ConfigObserver.onInetSocketAddress(String key, int defaultPort, ConfigValueListener<InetSocketAddress> listener)
focal_class.full_signature: public ConfigObserver onInetSocketAddress(String key, int defaultPort, ConfigValueListener<InetSocketAddress> listener)
focal_class.identifier: onInetSocketAddress
focal_class.modifiers: public
focal_class.parameters: (String key, int defaultPort, ConfigValueListener<InetSocketAddress> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onInetSocketAddress(String key, int defaultPort, ConfigValueListener<InetSocketAddress> listener)
focal_class.class_method_signature: ConfigObserver.onInetSocketAddress(String key, InetSocketAddress defaultAddress, ConfigValueListener<InetSocketAddress> listener)
focal_class.full_signature: public ConfigObserver onInetSocketAddress(String key, InetSocketAddress defaultAddress, ConfigValueListener<InetSocketAddress> listener)
focal_class.identifier: onInetSocketAddress
focal_class.modifiers: public
focal_class.parameters: (String key, InetSocketAddress defaultAddress, ConfigValueListener<InetSocketAddress> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onInetSocketAddress(String key, InetSocketAddress defaultAddress, ConfigValueListener<InetSocketAddress> listener)
focal_class.class_method_signature: ConfigObserver.onDurationValue(String key, Duration defaultValue, ConfigValueListener<Duration> listener)
focal_class.full_signature: public ConfigObserver onDurationValue(String key, Duration defaultValue, ConfigValueListener<Duration> listener)
focal_class.identifier: onDurationValue
focal_class.modifiers: public
focal_class.parameters: (String key, Duration defaultValue, ConfigValueListener<Duration> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onDurationValue(String key, Duration defaultValue, ConfigValueListener<Duration> listener)
focal_class.class_method_signature: ConfigObserver.onStringListValue(String key, String defaultValue, ConfigValueListener<List<String>> listener)
focal_class.full_signature: public ConfigObserver onStringListValue(String key, String defaultValue, ConfigValueListener<List<String>> listener)
focal_class.identifier: onStringListValue
focal_class.modifiers: public
focal_class.parameters: (String key, String defaultValue, ConfigValueListener<List<String>> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onStringListValue(String key, String defaultValue, ConfigValueListener<List<String>> listener)
focal_class.class_method_signature: ConfigObserver.onPrefixedValue(String prefix, ConfigValueListener<Map<String, String>> listener)
focal_class.full_signature: public ConfigObserver onPrefixedValue(String prefix, ConfigValueListener<Map<String, String>> listener)
focal_class.identifier: onPrefixedValue
focal_class.modifiers: public
focal_class.parameters: (String prefix, ConfigValueListener<Map<String, String>> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onPrefixedValue(String prefix, ConfigValueListener<Map<String, String>> listener)
focal_class.class_method_signature: ConfigObserver.onPrefixedValue(String prefix, ConfigListener.Transformer<T> transformer, ConfigValueListener<T> listener)
focal_class.full_signature: public ConfigObserver onPrefixedValue(String prefix, ConfigListener.Transformer<T> transformer, ConfigValueListener<T> listener)
focal_class.identifier: onPrefixedValue
focal_class.modifiers: public
focal_class.parameters: (String prefix, ConfigListener.Transformer<T> transformer, ConfigValueListener<T> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onPrefixedValue(String prefix, ConfigListener.Transformer<T> transformer, ConfigValueListener<T> listener)
focal_class.class_method_signature: ConfigObserver.onPrefixedOptionalValue(String prefix, ConfigListener.Transformer<T> transformer, ConfigValueListener<Optional<T>> listener)
focal_class.full_signature: public ConfigObserver onPrefixedOptionalValue(String prefix, ConfigListener.Transformer<T> transformer, ConfigValueListener<Optional<T>> listener)
focal_class.identifier: onPrefixedOptionalValue
focal_class.modifiers: public
focal_class.parameters: (String prefix, ConfigListener.Transformer<T> transformer, ConfigValueListener<Optional<T>> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onPrefixedOptionalValue(String prefix, ConfigListener.Transformer<T> transformer, ConfigValueListener<Optional<T>> listener)
focal_class.class_method_signature: ConfigObserver.onPrefixedOptionalValue(String prefix, ConfigValueListener<Optional<Map<String, String>>> listener)
focal_class.full_signature: public ConfigObserver onPrefixedOptionalValue(String prefix, ConfigValueListener<Optional<Map<String, String>>> listener)
focal_class.identifier: onPrefixedOptionalValue
focal_class.modifiers: public
focal_class.parameters: (String prefix, ConfigValueListener<Optional<Map<String, String>>> listener)
focal_class.return: ConfigObserver
focal_class.signature: ConfigObserver onPrefixedOptionalValue(String prefix, ConfigValueListener<Optional<Map<String, String>>> listener)
focal_class.class_method_signature: ConfigObserver.transform(Map<String, String> configuration, ConfigListener.Transformer<T> transformer)
focal_class.full_signature: protected T transform(Map<String, String> configuration, ConfigListener.Transformer<T> transformer)
focal_class.identifier: transform
focal_class.modifiers: protected
focal_class.parameters: (Map<String, String> configuration, ConfigListener.Transformer<T> transformer)
focal_class.return: T
focal_class.signature: T transform(Map<String, String> configuration, ConfigListener.Transformer<T> transformer)
focal_class.class_method_signature: ConfigObserver.applyConfiguration(ConfigValueListener<T> listener, T configuration)
focal_class.full_signature: protected void applyConfiguration(ConfigValueListener<T> listener, T configuration)
focal_class.identifier: applyConfiguration
focal_class.modifiers: protected
focal_class.parameters: (ConfigValueListener<T> listener, T configuration)
focal_class.return: void
focal_class.signature: void applyConfiguration(ConfigValueListener<T> listener, T configuration)
focal_class.class_method_signature: ConfigObserver.parseStringList(String value)
focal_class.full_signature: private static List<String> parseStringList(String value)
focal_class.identifier: parseStringList
focal_class.modifiers: private static
focal_class.parameters: (String value)
focal_class.return: List<String>
focal_class.signature: List<String> parseStringList(String value)
focal_class.class_method_signature: ConfigObserver.updateConfiguration(Map<String, String> newConfiguration)
focal_class.full_signature: public void updateConfiguration(Map<String, String> newConfiguration)
focal_class.identifier: updateConfiguration
focal_class.modifiers: public
focal_class.parameters: (Map<String, String> newConfiguration)
focal_class.return: void
focal_class.signature: void updateConfiguration(Map<String, String> newConfiguration)
focal_class.class_method_signature: ConfigObserver.findChangedKeys(Map<String, String> newConfiguration, Map<String, String> currentConfiguration)
focal_class.full_signature: private Set<String> findChangedKeys(Map<String, String> newConfiguration, Map<String, String> currentConfiguration)
focal_class.identifier: findChangedKeys
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> newConfiguration, Map<String, String> currentConfiguration)
focal_class.return: Set<String>
focal_class.signature: Set<String> findChangedKeys(Map<String, String> newConfiguration, Map<String, String> currentConfiguration)
focal_class.class_method_signature: ConfigObserver.handleConfigurationChanged(Set<String> changedKeys, ConfigMap newConfiguration)
focal_class.full_signature: protected void handleConfigurationChanged(Set<String> changedKeys, ConfigMap newConfiguration)
focal_class.identifier: handleConfigurationChanged
focal_class.modifiers: protected
focal_class.parameters: (Set<String> changedKeys, ConfigMap newConfiguration)
focal_class.return: void
focal_class.signature: void handleConfigurationChanged(Set<String> changedKeys, ConfigMap newConfiguration)
focal_class.class_method_signature: ConfigObserver.notifyListener(ConfigListener listener, Set<String> changedKeys, ConfigMap newConfiguration)
focal_class.full_signature: private void notifyListener(ConfigListener listener, Set<String> changedKeys, ConfigMap newConfiguration)
focal_class.identifier: notifyListener
focal_class.modifiers: private
focal_class.parameters: (ConfigListener listener, Set<String> changedKeys, ConfigMap newConfiguration)
focal_class.return: void
focal_class.signature: void notifyListener(ConfigListener listener, Set<String> changedKeys, ConfigMap newConfiguration)
focal_method.body: public <T> ConfigObserver onPrefixedValue(String prefix, ConfigValueListener<Map<String, String>> listener) {
          return onConfigChange(new ConfigListener() {
              @Override
              public void onConfigChanged(Set<String> changedKeys, ConfigMap newConfiguration) {
                  if (changeIncludes(changedKeys, prefix)) {
                      applyConfiguration(listener, newConfiguration.subMap(prefix).orElse(new ConfigMap()));
                  }
              }
          });
      }
focal_method.class_method_signature: ConfigObserver.onPrefixedValue(String prefix, ConfigValueListener<Map<String, String>> listener)
focal_method.full_signature: public ConfigObserver onPrefixedValue(String prefix, ConfigValueListener<Map<String, String>> listener)
focal_method.identifier: onPrefixedValue
focal_method.invocations: onConfigChange changeIncludes applyConfiguration orElse subMap
focal_method.modifiers: public
focal_method.parameters: (String prefix, ConfigValueListener<Map<String, String>> listener)
focal_method.return: ConfigObserver
focal_method.signature: ConfigObserver onPrefixedValue(String prefix, ConfigValueListener<Map<String, String>> listener)