|
16 | 16 | import com.ning.http.client.AsyncHttpClientConfig;
|
17 | 17 | import com.ning.http.client.ConnectionsPool;
|
18 | 18 |
|
| 19 | +import org.glassfish.grizzly.CloseListener; |
19 | 20 | import org.glassfish.grizzly.Connection;
|
20 | 21 | import org.glassfish.grizzly.Grizzly;
|
21 | 22 | import org.glassfish.grizzly.attributes.Attribute;
|
22 |
| -import org.glassfish.grizzly.attributes.NullaryFunction; |
23 | 23 | import org.glassfish.grizzly.utils.DataStructures;
|
| 24 | +import org.glassfish.grizzly.utils.NullaryFunction; |
24 | 25 | import org.slf4j.Logger;
|
25 | 26 | import org.slf4j.LoggerFactory;
|
26 | 27 |
|
@@ -57,7 +58,7 @@ public class GrizzlyConnectionsPool implements ConnectionsPool<String,Connection
|
57 | 58 | private final boolean unlimitedConnections;
|
58 | 59 | private final long timeout;
|
59 | 60 | private final DelayedExecutor delayedExecutor;
|
60 |
| - private final Connection.CloseListener listener; |
| 61 | + private final CloseListener listener; |
61 | 62 |
|
62 | 63 |
|
63 | 64 | // ------------------------------------------------------------ Constructors
|
@@ -335,7 +336,7 @@ public void run() {
|
335 | 336 | if (LOG.isDebugEnabled()) {
|
336 | 337 | LOG.debug("Idle connection ({}) detected. Removing from cache.", element.toString());
|
337 | 338 | }
|
338 |
| - element.close().markForRecycle(true); |
| 339 | + element.close().recycle(true); |
339 | 340 | } catch (Exception ignored) {
|
340 | 341 | }
|
341 | 342 | }
|
@@ -409,7 +410,7 @@ boolean isEmpty() {
|
409 | 410 |
|
410 | 411 | void destroy() {
|
411 | 412 | for (Connection c : queue) {
|
412 |
| - c.close().markForRecycle(true); |
| 413 | + c.close().recycle(true); |
413 | 414 | }
|
414 | 415 | queue.clear();
|
415 | 416 | queues.remove(this);
|
|
0 commit comments