public synchronized int waitForAndKillPrimaryMaster ( int timeoutMs ) throws TimeoutException , InterruptedException { int index = getPrimaryMasterIndex ( timeoutMs ) ; mMasters . get ( index ) . close ( ) ; return index ; }
Kills the primary master .