question: private static List < Ignite > allGrids ( boolean wait ) { List < Ignite > allIgnites = new ArrayList < > ( grids . size ( ) + 1 ) ; for ( IgniteNamedInstance grid : grids . values ( ) ) { Ignite g = wait ? grid . grid ( ) : grid . gridx ( ) ; if ( g != null ) allIgnites . add ( g ) ; } IgniteNamedInstance dfltGrid0 = dfltGrid ; if ( dfltGrid0 != null ) { IgniteKernal g = wait ? dfltGrid0 . grid ( ) : dfltGrid0 . gridx ( ) ; if ( g != null ) allIgnites . add ( g ) ; } return allIgnites ; }
target:  Gets a list of all grids started so far.