private static List < String > assembleSeedNodes ( ConnectionString connectionString , CouchbaseEnvironment environment ) { List < String > seedNodes = new ArrayList < String > ( ) ; if ( environment . dnsSrvEnabled ( ) ) { seedNodesViaDnsSrv ( connectionString , environment , seedNodes ) ; } else { for ( InetSocketAddress node : connectionString . hosts ( ) ) { seedNodes . add ( ALLOW_HOSTNAMES_AS_SEED_NODES ? node . getHostName ( ) : node . getAddress ( ) . getHostAddress ( ) ) ; } } if ( seedNodes . isEmpty ( ) ) { seedNodes . add ( DEFAULT_HOST ) ; } return seedNodes ; }
Helper method to assemble list of seed nodes depending on the given input .