diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectionPool.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectionPool.java index 4d9171a23fa..1489272c466 100644 --- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectionPool.java +++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectionPool.java @@ -306,7 +306,6 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen attachable.setAttachment(new EntryHolder(entry)); onCreated(connection); entry.enable(connection, false); - idle(connection, false); return true; } @@ -359,7 +358,6 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen if (LOG.isDebugEnabled()) LOG.debug("Activated {} {}", entry, pool); - acquired(connection); return connection; } return null; @@ -380,10 +378,7 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen @Override public boolean release(Connection connection) { - if (!deactivate(connection)) - return false; - released(connection); - return idle(connection, isStopped()); + return deactivate(connection); } protected boolean deactivate(Connection connection) @@ -432,10 +427,7 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen if (LOG.isDebugEnabled()) LOG.debug("Removed ({}) {} {}", removed, holder.entry, pool); if (removed) - { - released(connection); onRemoved(connection); - } return removed; } @@ -449,45 +441,6 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen { } - /** - * @param connection the {@link Connection} that become idle - * @param close whether this pool is closing - * @return {@code true} to indicate that the connection is idle, {@code false} otherwise - * @deprecated Racy API. Do not use. There is no replacement. - */ - @Deprecated(since = "12.0.8", forRemoval = true) - protected boolean idle(Connection connection, boolean close) - { - return !close; - } - - /** - * @param connection the {@link Connection} that was acquired - * @deprecated Racy API. Do not use. There is no replacement. - */ - @Deprecated(since = "12.0.8", forRemoval = true) - protected void acquired(Connection connection) - { - } - - /** - * @param connection the {@link Connection} that was released - * @deprecated Racy API. Do not use. There is no replacement. - */ - @Deprecated(since = "12.0.8", forRemoval = true) - protected void released(Connection connection) - { - } - - /** - * @param connection the {@link Connection} that was removed - * @deprecated replaced by {@link #onRemoved(Connection)} - */ - @Deprecated(since = "12.0.8", forRemoval = true) - protected void removed(Connection connection) - { - } - /** *

Callback method invoked when a {@link Connection} has been removed from this pool.

* @@ -496,7 +449,6 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen */ protected void onRemoved(Connection connection) { - removed(connection); } Collection getIdleConnections() @@ -610,7 +562,6 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen onCreated(connection); pending.decrementAndGet(); reserved.enable(connection, false); - idle(connection, false); super.succeeded(connection); proceed(); } diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/ValidatingConnectionPool.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/ValidatingConnectionPool.java index a6d8b221540..c0ec38eec06 100644 --- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/ValidatingConnectionPool.java +++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/ValidatingConnectionPool.java @@ -80,8 +80,6 @@ public class ValidatingConnectionPool extends DuplexConnectionPool quarantine.put(connection, holder); if (LOG.isDebugEnabled()) LOG.debug("Validating for {}ms {}", timeout, connection); - - released(connection); return true; } @@ -135,7 +133,6 @@ public class ValidatingConnectionPool extends DuplexConnectionPool quarantine.remove(connection); if (!closed) deactivate(connection); - idle(connection, closed); proceed(); } }