@ Override public void start ( InetSocketAddress address ) throws IOException { mName = address . getHostName ( ) + ":" + address . getPort ( ) ; mLeaderSelector . setId ( mName ) ; mLeaderSelector . start ( ) ; }
Starts the leader selection . If the leader selector client loses connection to Zookeeper or gets closed the calling thread will be interrupted .