private PoolSchedulable getPoolSchedulable ( PoolInfo poolInfo ) { PoolGroupSchedulable poolGroup = nameToPoolGroup . get ( poolInfo . getPoolGroupName ( ) ) ; if ( poolGroup == null ) { poolGroup = new PoolGroupSchedulable ( poolInfo . getPoolGroupName ( ) , type , configManager ) ; PoolGroupSchedulable prevPoolGroup = nameToPoolGroup . putIfAbsent ( poolInfo . getPoolGroupName ( ) , poolGroup ) ; if ( prevPoolGroup != null ) { poolGroup = prevPoolGroup ; } } return poolGroup . getPool ( poolInfo ) ; }
Get the Schedulable representing the pool with a given name If it doesn t exist - create it and add it to the list