@ Override public final void put ( Object o ) { boolean discarded = false ; if ( inactive ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setting active: " + this ) ; // If the pool was marked inactive by the pool manager alarm, then // switch it back to active. Hopefully this happens before too // many other threads notice and cause contention with the // following sync block. inactive = false ; // If this pool has been inactive long enough to be marked // unmanaged, then add it back as managed again. synchronized ( this ) { if ( ! ivManaged ) { poolMgr . add ( this ) ; ivManaged = true ; } } } discarded = ! buffer . pushWithLimit ( o , poolSize . maxSize ) ; if ( discarded ) { if ( discardStrategy != null ) { discardStrategy . discard ( o ) ; } } if ( beanPerf != null ) { // Update PMI data beanPerf . objectReturn ( buffer . size ( ) , discarded ) ; } }
Return an object instance to this pool .