Skip to content

Commit

Permalink
Issue #12023 - Remove deprecated classes/methods.
Browse files Browse the repository at this point in the history
Removed deprecated methods from AbstractConnectionPool.

Signed-off-by: Simone Bordet <[email protected]>
  • Loading branch information
sbordet committed Aug 7, 2024
1 parent 2ba2250 commit 9e427dd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ public boolean accept(Connection connection)
attachable.setAttachment(new EntryHolder(entry));
onCreated(connection);
entry.enable(connection, false);
idle(connection, false);
return true;
}

Expand Down Expand Up @@ -359,7 +358,6 @@ protected Connection activate()

if (LOG.isDebugEnabled())
LOG.debug("Activated {} {}", entry, pool);
acquired(connection);
return connection;
}
return null;
Expand All @@ -380,10 +378,7 @@ public boolean isActive(Connection connection)
@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)
Expand Down Expand Up @@ -432,10 +427,7 @@ public boolean remove(Connection connection)
if (LOG.isDebugEnabled())
LOG.debug("Removed ({}) {} {}", removed, holder.entry, pool);
if (removed)
{
released(connection);
onRemoved(connection);
}
return removed;
}

Expand All @@ -449,45 +441,6 @@ protected void onCreated(Connection connection)
{
}

/**
* @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>
*
Expand All @@ -496,7 +449,6 @@ protected void removed(Connection connection)
*/
protected void onRemoved(Connection connection)
{
removed(connection);
}

Collection<Connection> getIdleConnections()
Expand Down Expand Up @@ -610,7 +562,6 @@ public void succeeded(Connection connection)
onCreated(connection);
pending.decrementAndGet();
reserved.enable(connection, false);
idle(connection, false);
super.succeeded(connection);
proceed();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ public boolean release(Connection connection)
quarantine.put(connection, holder);
if (LOG.isDebugEnabled())
LOG.debug("Validating for {}ms {}", timeout, connection);

released(connection);
return true;
}

Expand Down Expand Up @@ -135,7 +133,6 @@ public void run()
quarantine.remove(connection);
if (!closed)
deactivate(connection);
idle(connection, closed);
proceed();
}
}
Expand Down

0 comments on commit 9e427dd

Please sign in to comment.