selects a zk client port . returns the default port if specified . otherwise , returns a random port . the random port is selected from the range between 49152 to 65535 . these ports can not be registered with iana and are intended for dynamic allocation see http://bit.ly/dynports . concode_field_sep List<NIOServerCnxnFactory> standaloneServerFactoryList concode_elem_sep int tickTime concode_elem_sep Configuration configuration concode_elem_sep int activeZKServerIndex concode_elem_sep int defaultClientPort concode_elem_sep boolean started concode_elem_sep List<ZooKeeperServer> zooKeeperServers concode_elem_sep int MAX_CLIENT_CONNECTIONS concode_elem_sep Logger LOG concode_elem_sep int CONNECTION_TIMEOUT concode_elem_sep int TICK_TIME concode_elem_sep int clientPort concode_elem_sep List<Integer> clientPortList concode_field_sep void recreateDir concode_elem_sep void setTickTime concode_elem_sep void setDefaultClientPort concode_elem_sep int killCurrentActiveZooKeeperServer concode_elem_sep void setupTestEnv concode_elem_sep int startup concode_elem_sep int startup concode_elem_sep int getClientPort concode_elem_sep int getBackupZooKeeperServerNum concode_elem_sep boolean waitForServerDown concode_elem_sep int getZooKeeperServerNum concode_elem_sep void killOneBackupZooKeeperServer concode_elem_sep void shutdown concode_elem_sep boolean waitForServerUp
int function ( ) { if ( defaultClientPort > 0 ) { return defaultClientPort ; } return 0xc000 + new Random ( ) . nextInt ( 0x3f00 ) ; }