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:
parent
2ba2250ac8
commit
9e427dd57a
|
@ -306,7 +306,6 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen
|
||||||
attachable.setAttachment(new EntryHolder(entry));
|
attachable.setAttachment(new EntryHolder(entry));
|
||||||
onCreated(connection);
|
onCreated(connection);
|
||||||
entry.enable(connection, false);
|
entry.enable(connection, false);
|
||||||
idle(connection, false);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,7 +358,6 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen
|
||||||
|
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("Activated {} {}", entry, pool);
|
LOG.debug("Activated {} {}", entry, pool);
|
||||||
acquired(connection);
|
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -380,10 +378,7 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen
|
||||||
@Override
|
@Override
|
||||||
public boolean release(Connection connection)
|
public boolean release(Connection connection)
|
||||||
{
|
{
|
||||||
if (!deactivate(connection))
|
return deactivate(connection);
|
||||||
return false;
|
|
||||||
released(connection);
|
|
||||||
return idle(connection, isStopped());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean deactivate(Connection connection)
|
protected boolean deactivate(Connection connection)
|
||||||
|
@ -432,10 +427,7 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("Removed ({}) {} {}", removed, holder.entry, pool);
|
LOG.debug("Removed ({}) {} {}", removed, holder.entry, pool);
|
||||||
if (removed)
|
if (removed)
|
||||||
{
|
|
||||||
released(connection);
|
|
||||||
onRemoved(connection);
|
onRemoved(connection);
|
||||||
}
|
|
||||||
return removed;
|
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>
|
* <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)
|
protected void onRemoved(Connection connection)
|
||||||
{
|
{
|
||||||
removed(connection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Collection<Connection> getIdleConnections()
|
Collection<Connection> getIdleConnections()
|
||||||
|
@ -610,7 +562,6 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen
|
||||||
onCreated(connection);
|
onCreated(connection);
|
||||||
pending.decrementAndGet();
|
pending.decrementAndGet();
|
||||||
reserved.enable(connection, false);
|
reserved.enable(connection, false);
|
||||||
idle(connection, false);
|
|
||||||
super.succeeded(connection);
|
super.succeeded(connection);
|
||||||
proceed();
|
proceed();
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,8 +80,6 @@ public class ValidatingConnectionPool extends DuplexConnectionPool
|
||||||
quarantine.put(connection, holder);
|
quarantine.put(connection, holder);
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("Validating for {}ms {}", timeout, connection);
|
LOG.debug("Validating for {}ms {}", timeout, connection);
|
||||||
|
|
||||||
released(connection);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +133,6 @@ public class ValidatingConnectionPool extends DuplexConnectionPool
|
||||||
quarantine.remove(connection);
|
quarantine.remove(connection);
|
||||||
if (!closed)
|
if (!closed)
|
||||||
deactivate(connection);
|
deactivate(connection);
|
||||||
idle(connection, closed);
|
|
||||||
proceed();
|
proceed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue