Skip to content

Commit c9e7807

Browse files
committed
Issue #12023 - Remove deprecated classes/methods.
Removed deprecated methods from AbstractConnectionPool. Signed-off-by: Simone Bordet <[email protected]>
1 parent 5905b99 commit c9e7807

File tree

2 files changed

+1
-53
lines changed

2 files changed

+1
-53
lines changed

jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectionPool.java

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/ValidatingConnectionPool.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ public boolean release(Connection connection)
8080
quarantine.put(connection, holder);
8181
if (LOG.isDebugEnabled())
8282
LOG.debug("Validating for {}ms {}", timeout, connection);
83-
84-
released(connection);
8583
return true;
8684
}
8785

@@ -135,7 +133,6 @@ public void run()
135133
quarantine.remove(connection);
136134
if (!closed)
137135
deactivate(connection);
138-
idle(connection, closed);
139136
proceed();
140137
}
141138
}

0 commit comments

Comments
 (0)