question: private void updateShardRoutingEntries ( String shardId , String appUri ) { if ( appUri . equals ( myAppUri ) ) { logger . warn ( "Trying to update routingTable with self appUri. -- skip" ) ; return ; } List < String > appUris = lookupRoutingTable ( shardId ) ; List < String > newAppUris = new ArrayList < > ( appUris . size ( ) ) ; newAppUris . add ( appUri ) ; for ( String appUrl : appUris ) { if ( ! appUrl . equals ( appUri ) ) { newAppUris . add ( appUrl ) ; } } trace ( "[{}] Update shard '{}' leader as {}" , gondola . getHostId ( ) , shardId , appUri ) ; routingTable . put ( shardId , newAppUris ) ; }
target:  Moves newAppUrl to the first entry of the routing table.