public List < HostAddress > connectedHosts ( ) { List < HostAddress > usedHost = new ArrayList <> ( ) ; if ( isMasterHostFail ( ) ) { Protocol masterProtocol = waitNewMasterProtocol . get ( ) ; if ( masterProtocol != null ) { usedHost . add ( masterProtocol . getHostAddress ( ) ) ; } } else { usedHost . add ( masterProtocol . getHostAddress ( ) ) ; } if ( isSecondaryHostFail ( ) ) { Protocol secondProtocol = waitNewSecondaryProtocol . get ( ) ; if ( secondProtocol != null ) { usedHost . add ( secondProtocol . getHostAddress ( ) ) ; } } else { usedHost . add ( secondaryProtocol . getHostAddress ( ) ) ; } return usedHost ; }
List current connected HostAddress .