public synchronized List getList ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getList" ) ; // Remove a List from the pool List list = ( List ) listPool . remove ( ) ; // If the list is null then there was none available in the pool // So create a new one if ( list == null ) { if ( tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "No list available from pool - creating a new one" ) ; // We could change the list implementation here if we wanted list = new ArrayList ( 5 ) ; } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getList" ) ; return list ; }
Gets a list from the pool .