public int getPeerPort ( String nodeName ) { if ( Objects . equal ( _nodeName , nodeName ) ) { return _self . port ; } PeerNode peer = _peers . get ( nodeName ) ; return ( peer == null ) ? - 1 : peer . getPort ( ) ; }
Returns the port on which to connect to the specified peer or - 1 if the peer is not currently connected to this server .