Split responsibilities of the auto reload config

Reduce the complexity of the AutoReloadConfigDecorator
by decomposing it into two parts:

1. Background thread for detecting and reloading the config.
   AutoReloadRunnable is only aware of what needs to be done to reload
   a configuration safely and notify whoever is bound to react on
   configuration reloads.

2. Decorator of the ReplicationFileBasedConfig that orchestrate reload.
   AutoReloadConfigDecorator has a lot fewer responsibilities and is
   limited to delegate the config and destinations interface methods
   and acting as configuration listener.

The propagation of the new configuration to the other objects
is done through a Guava's EventBus.

Allow putting back the logic of the file-based config into the
respective FileBasedReplicationConfig and abstract the concept of the
last modification in a generic version string.

NOTE: The validation of the new configuration is left out of scope
      of this change and is implemented separately.

Feature: Issue 11425
Change-Id: Iaee9b72801bbe3ddac5113df6c53676934687aab
7 files changed
tree: a5e1964c63d7417b26ca878802239f5c9614963b
  1. .settings/
  2. src/
  3. .gitignore
  4. .mailmap
  5. BUILD
  6. LICENSE