private boolean add ( ResourceInternal < T > resource ) { try { mLock . lock ( ) ; if ( mResources . size ( ) >= mMaxCapacity ) { return false ; } else { mResources . put ( resource . mResource , resource ) ; return true ; } } finally { mLock . unlock ( ) ; } }
Adds a newly created resource to the pool . The resource is not available when it is added .