@@ -307,7 +307,6 @@ public boolean accept(Connection connection)
307307 attachable .setAttachment (new EntryHolder (entry ));
308308 onCreated (connection );
309309 entry .enable (connection , false );
310- idle (connection , false );
311310 return true ;
312311 }
313312
@@ -370,7 +369,6 @@ protected Connection activate()
370369
371370 if (LOG .isDebugEnabled ())
372371 LOG .debug ("Activated {} {}" , entry , pool );
373- acquired (connection );
374372 return connection ;
375373 }
376374 return null ;
@@ -391,10 +389,7 @@ public boolean isActive(Connection connection)
391389 @ Override
392390 public boolean release (Connection connection )
393391 {
394- if (!deactivate (connection ))
395- return false ;
396- released (connection );
397- return idle (connection , isStopped ());
392+ return deactivate (connection );
398393 }
399394
400395 protected boolean deactivate (Connection connection )
@@ -443,10 +438,7 @@ public boolean remove(Connection connection)
443438 if (LOG .isDebugEnabled ())
444439 LOG .debug ("Removed ({}) {} {}" , removed , holder .entry , pool );
445440 if (removed )
446- {
447- released (connection );
448441 onRemoved (connection );
449- }
450442 return removed ;
451443 }
452444
@@ -460,45 +452,6 @@ protected void onCreated(Connection connection)
460452 {
461453 }
462454
463- /**
464- * @param connection the {@link Connection} that become idle
465- * @param close whether this pool is closing
466- * @return {@code true} to indicate that the connection is idle, {@code false} otherwise
467- * @deprecated Racy API. Do not use. There is no replacement.
468- */
469- @ Deprecated (since = "12.0.8" , forRemoval = true )
470- protected boolean idle (Connection connection , boolean close )
471- {
472- return !close ;
473- }
474-
475- /**
476- * @param connection the {@link Connection} that was acquired
477- * @deprecated Racy API. Do not use. There is no replacement.
478- */
479- @ Deprecated (since = "12.0.8" , forRemoval = true )
480- protected void acquired (Connection connection )
481- {
482- }
483-
484- /**
485- * @param connection the {@link Connection} that was released
486- * @deprecated Racy API. Do not use. There is no replacement.
487- */
488- @ Deprecated (since = "12.0.8" , forRemoval = true )
489- protected void released (Connection connection )
490- {
491- }
492-
493- /**
494- * @param connection the {@link Connection} that was removed
495- * @deprecated replaced by {@link #onRemoved(Connection)}
496- */
497- @ Deprecated (since = "12.0.8" , forRemoval = true )
498- protected void removed (Connection connection )
499- {
500- }
501-
502455 /**
503456 * <p>Callback method invoked when a {@link Connection} has been removed from this pool.</p>
504457 *
@@ -507,7 +460,6 @@ protected void removed(Connection connection)
507460 */
508461 protected void onRemoved (Connection connection )
509462 {
510- removed (connection );
511463 }
512464
513465 Collection <Connection > getIdleConnections ()
@@ -621,7 +573,6 @@ public void succeeded(Connection connection)
621573 onCreated (connection );
622574 pending .decrementAndGet ();
623575 reserved .enable (connection , false );
624- idle (connection , false );
625576 super .succeeded (connection );
626577 proceed ();
627578 }
0 commit comments