Javadoc
Handler for --failover command. The way failover works is,
- the client gets from user input
- the client uses HS2 HA registry to get list of HS2 instances and finds the one that matches
- if there is a match, client makes sure the instance is a leader (only leader can failover)
- if the matched instance is a leader, its web endpoint is obtained from service record then http DELETE method
is invoked on /leader endpoint (Yes. Manual failover requires web UI to be enabled)
- the webpoint checks if admin ACLs are set, if so will close and restart the leader latch triggering a failover