Leverage ShutdownState in SourcesCollection

SourcesCollection uses a `shuttingDown` boolean variable to check
whether the configuration should be reloaded.

Updates to the `shuttingDown` variable are done within a synchronized
block, so ensure only one thread at a time can access it.

Since change Ic672c7df5 introduced the `ShutdownState` singleton
however, that should be used to signal and check the shutdown state
of the plugin.

Note that the `ShutdownState` also properly sets the state in a
thread-safe manner, as an equivalent replacement for the syncrhonized
block.

Change-Id: I1022d46f37a89f94fa70721daccf8436617cdfad
1 file changed
tree: 95d091d7db726c49acbeb45f3020104f41ded259
  1. example-setup/
  2. src/
  3. .gitignore
  4. BUILD
  5. external_plugin_deps.bzl
  6. Jenkinsfile
  7. LICENSE