neo4j/neo4j — pull request #2295 by rickardoberg (2014-04-23 06:05:22+00:00)
Title: HighAvailabilityModeSwitcher refactoring and fixes

HAMS has been refactored so that it mainly deals with decision and coordination. The actual switch code is in separate classes.
This PR also fixes that shutdown was not happening on switcher thread, which during testing can cause the situation that an instance is first shutdown, but then switches to slave in the separate thread. All switching now happens on the same thread, so that the outcome is deterministic.