private void joinSelf ( ServerHeartbeat server , String extAddress , int extPort , String address , int port , String serverHash ) { if ( server != _serverSelf ) { throw new IllegalStateException ( L . l ( "Invalid self: {0} vs {1}" , server , _serverSelf ) ) ; } if ( ! serverHash . equals ( _serverSelf . getMachineHash ( ) ) ) { throw new IllegalStateException ( L . l ( "Invalid server hash {0} against {1}:{2}({3})" , _serverSelf , address , port , serverHash ) ) ; } if ( port != _serverSelf . port ( ) ) { throw new IllegalStateException ( L . l ( "Invalid server port {0} against {1}:{2}({3})" , _serverSelf , address , port , serverHash ) ) ; } boolean isSSL = false ; ServerHeartbeat extServer = getCluster ( ) . createServer ( extAddress , extPort , isSSL ) ; server . setExternalServer ( extServer ) ; server . setMachineHash ( serverHash ) ; server . getRack ( ) . update ( server . getUpdate ( ) ) ; heartbeatStart ( server ) ; updateHubHeartbeatSelf ( ) ; //_podService.updatePodsFromHeartbeat(); log . fine ( "join self " + server ) ; }
received a join from this server . Used to update external IPs .