sonatype/nexus — pull request #629 by cstamas (2012-10-31 12:13:50+00:00)
Title: NEXUS-5354: Deadlock fix

sync access and locks were causing a deadlock. Now, sync method
access is removed, and same is done using lock (synced access
guaranteed by exclusive lock).

Changes:
* removal of synchronized method calls (one participant of deadlock)
* redoing same method serialisation of start/stop methods using exclusive lock
* isStarted made protected, ensured is always called from already locked regions only
* extracting indexer methods, fixed the retries (before they might attempt to retry even if it was unneeded
* smaller fixes
* comments added what is being done