public void prime ( LogTarget lt , int prime ) throws APIException { for ( int i = 0 ; i < prime ; ++ i ) { Pooled < T > pt = new Pooled < T > ( creator . create ( ) , this , lt ) ; synchronized ( list ) { list . addFirst ( pt ) ; ++ count ; } } }
Preallocate a certain number of T Objects . Useful for services so that the first transactions don t get hit with all the Object creation costs