Issue #12023 - Remove deprecated classes/methods.

Removed deprecated methods from AbstractConnectionPool.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2024-08-07 12:06:51 +02:00
parent 2ba2250ac8
commit 9e427dd57a
No known key found for this signature in database
GPG Key ID: 1677D141BCF3584D
2 changed files with 1 additions and 53 deletions

View File

@ -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)
{
}
/**
* <p>Callback method invoked when a {@link Connection} has been removed from this pool.</p>
*
@ -496,7 +449,6 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen
*/
protected void onRemoved(Connection connection)
{
removed(connection);
}
Collection<Connection> 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();
}

View File

@ -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();
}
}