public void init ( Target . Context context , List < Target . ConfigIssue > issues ) { List < Host > hosts = getAerospikeHosts ( issues , connectionString , Groups . AEROSPIKE . getLabel ( ) , "aerospikeBeanConfig.connectionString" , context ) ; ClientPolicy cp = new ClientPolicy ( ) ; try { client = new AerospikeClient ( cp , hosts . toArray ( new Host [ hosts . size ( ) ] ) ) ; int retries = 0 ; while ( ! client . isConnected ( ) && retries <= maxRetries ) { if ( retries > maxRetries ) { issues . add ( context . createConfigIssue ( Groups . AEROSPIKE . getLabel ( ) , "aerospikeBeanConfig.connectionString" , AerospikeErrors . AEROSPIKE_03 , connectionString ) ) ; return ; } retries ++ ; try { Thread . sleep ( 100 ) ; } catch ( InterruptedException ignored ) { } } } catch ( AerospikeException ex ) { issues . add ( context . createConfigIssue ( Groups . AEROSPIKE . getLabel ( ) , "aerospikeBeanConfig.connectionString" , AerospikeErrors . AEROSPIKE_03 , connectionString ) ) ; } }
initialize and validate configuration options