diff --git a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/ClientConnectorDocs.java b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/ClientConnectorDocs.java
index 3cbb717b391..e75148d384b 100644
--- a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/ClientConnectorDocs.java
+++ b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/ClientConnectorDocs.java
@@ -387,7 +387,7 @@ public class ClientConnectorDocs
// Wrap the "telnet" ClientConnectionFactory with the SslClientConnectionFactory.
connectionFactory = new SslClientConnectionFactory(clientConnector.getSslContextFactory(),
- clientConnector.getRetainableByteBufferPool(), clientConnector.getExecutor(), connectionFactory);
+ clientConnector.getByteBufferPool(), clientConnector.getExecutor(), connectionFactory);
// We will obtain a SslConnection now.
CompletableFuture connectionPromise = new Promise.Completable<>();
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java
index a6fb97ff50e..d881149e840 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java
@@ -52,7 +52,7 @@ public abstract class AbstractConnectorHttpClientTransport extends AbstractHttpC
{
HttpClient httpClient = getHttpClient();
connector.setBindAddress(httpClient.getBindAddress());
- connector.setRetainableByteBufferPool(httpClient.getRetainableByteBufferPool());
+ connector.setByteBufferPool(httpClient.getByteBufferPool());
connector.setConnectBlocking(httpClient.isConnectBlocking());
connector.setConnectTimeout(Duration.ofMillis(httpClient.getConnectTimeout()));
connector.setExecutor(httpClient.getExecutor());
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/GZIPContentDecoder.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/GZIPContentDecoder.java
index aa09fa56785..2f8467b8ebc 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/GZIPContentDecoder.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/GZIPContentDecoder.java
@@ -13,8 +13,8 @@
package org.eclipse.jetty.client;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
/**
* {@link ContentDecoder} for the "gzip" encoding.
@@ -33,9 +33,9 @@ public class GZIPContentDecoder extends org.eclipse.jetty.http.GZIPContentDecode
this(null, bufferSize);
}
- public GZIPContentDecoder(RetainableByteBufferPool retainableByteBufferPool, int bufferSize)
+ public GZIPContentDecoder(ByteBufferPool byteBufferPool, int bufferSize)
{
- super(retainableByteBufferPool, bufferSize);
+ super(byteBufferPool, bufferSize);
}
@Override
@@ -50,7 +50,7 @@ public class GZIPContentDecoder extends org.eclipse.jetty.http.GZIPContentDecode
*/
public static class Factory extends ContentDecoder.Factory
{
- private final RetainableByteBufferPool retainableByteBufferPool;
+ private final ByteBufferPool byteBufferPool;
private final int bufferSize;
public Factory()
@@ -63,22 +63,22 @@ public class GZIPContentDecoder extends org.eclipse.jetty.http.GZIPContentDecode
this(null, bufferSize);
}
- public Factory(RetainableByteBufferPool retainableByteBufferPool)
+ public Factory(ByteBufferPool byteBufferPool)
{
- this(retainableByteBufferPool, DEFAULT_BUFFER_SIZE);
+ this(byteBufferPool, DEFAULT_BUFFER_SIZE);
}
- public Factory(RetainableByteBufferPool retainableByteBufferPool, int bufferSize)
+ public Factory(ByteBufferPool byteBufferPool, int bufferSize)
{
super("gzip");
- this.retainableByteBufferPool = retainableByteBufferPool;
+ this.byteBufferPool = byteBufferPool;
this.bufferSize = bufferSize;
}
@Override
public ContentDecoder newContentDecoder()
{
- return new GZIPContentDecoder(retainableByteBufferPool, bufferSize);
+ return new GZIPContentDecoder(byteBufferPool, bufferSize);
}
}
}
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
index 45736485e0d..7e392facf31 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
@@ -49,9 +49,9 @@ import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpParser;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;
import org.eclipse.jetty.util.Fields;
import org.eclipse.jetty.util.Jetty;
@@ -199,9 +199,9 @@ public class HttpClient extends ContainerLifeCycle
int maxBucketSize = executor instanceof ThreadPool.SizedThreadPool
? ((ThreadPool.SizedThreadPool)executor).getMaxThreads() / 2
: ProcessorUtils.availableProcessors() * 2;
- RetainableByteBufferPool retainableByteBufferPool = getRetainableByteBufferPool();
- if (retainableByteBufferPool == null)
- setRetainableByteBufferPool(new ArrayRetainableByteBufferPool(0, 2048, 65536, maxBucketSize));
+ ByteBufferPool byteBufferPool = getByteBufferPool();
+ if (byteBufferPool == null)
+ setByteBufferPool(new ArrayRetainableByteBufferPool(0, 2048, 65536, maxBucketSize));
Scheduler scheduler = getScheduler();
if (scheduler == null)
{
@@ -220,7 +220,7 @@ public class HttpClient extends ContainerLifeCycle
handlers.put(new ProxyAuthenticationProtocolHandler(this));
handlers.put(new UpgradeProtocolHandler());
- decoderFactories.put(new GZIPContentDecoder.Factory(retainableByteBufferPool));
+ decoderFactories.put(new GZIPContentDecoder.Factory(byteBufferPool));
cookieManager = newCookieManager();
cookieStore = cookieManager.getCookieStore();
@@ -646,19 +646,19 @@ public class HttpClient extends ContainerLifeCycle
}
/**
- * @return the {@link RetainableByteBufferPool} of this HttpClient
+ * @return the {@link ByteBufferPool} of this HttpClient
*/
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return connector.getRetainableByteBufferPool();
+ return connector.getByteBufferPool();
}
/**
- * @param retainableByteBufferPool the {@link RetainableByteBufferPool} of this HttpClient
+ * @param byteBufferPool the {@link ByteBufferPool} of this HttpClient
*/
- public void setRetainableByteBufferPool(RetainableByteBufferPool retainableByteBufferPool)
+ public void setByteBufferPool(ByteBufferPool byteBufferPool)
{
- connector.setRetainableByteBufferPool(retainableByteBufferPool);
+ connector.setByteBufferPool(byteBufferPool);
}
/**
@@ -1152,6 +1152,6 @@ public class HttpClient extends ContainerLifeCycle
{
if (sslContextFactory == null)
sslContextFactory = getSslContextFactory();
- return new SslClientConnectionFactory(sslContextFactory, getRetainableByteBufferPool(), getExecutor(), connectionFactory);
+ return new SslClientConnectionFactory(sslContextFactory, getByteBufferPool(), getExecutor(), connectionFactory);
}
}
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/InputStreamRequestContent.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/InputStreamRequestContent.java
index f9be0ff1150..4978329d2de 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/InputStreamRequestContent.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/InputStreamRequestContent.java
@@ -15,7 +15,7 @@ package org.eclipse.jetty.client;
import java.io.InputStream;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.content.InputStreamContentSource;
/**
@@ -51,7 +51,7 @@ public class InputStreamRequestContent extends InputStreamContentSource implemen
this(contentType, stream, null);
}
- public InputStreamRequestContent(String contentType, InputStream stream, RetainableByteBufferPool bufferPool)
+ public InputStreamRequestContent(String contentType, InputStream stream, ByteBufferPool bufferPool)
{
super(stream, bufferPool);
this.contentType = contentType;
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathRequestContent.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathRequestContent.java
index dc9ee8ed059..2bcfcdab583 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathRequestContent.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathRequestContent.java
@@ -16,14 +16,14 @@ package org.eclipse.jetty.client;
import java.io.IOException;
import java.nio.file.Path;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.content.PathContentSource;
/**
* A {@link Request.Content} for files using JDK 7's {@code java.nio.file} APIs.
* It is possible to specify a buffer size used to read content from the stream,
* by default 4096 bytes, whether the buffer should be direct or not, and a
- * {@link RetainableByteBufferPool} from which {@code ByteBuffer}s will be acquired
+ * {@link ByteBufferPool} from which {@code ByteBuffer}s will be acquired
* to read from the {@code Path}.
*/
public class PathRequestContent extends PathContentSource implements Request.Content
@@ -51,7 +51,7 @@ public class PathRequestContent extends PathContentSource implements Request.Con
setBufferSize(bufferSize);
}
- public PathRequestContent(String contentType, Path filePath, RetainableByteBufferPool bufferPool) throws IOException
+ public PathRequestContent(String contentType, Path filePath, ByteBufferPool bufferPool) throws IOException
{
super(filePath, bufferPool);
this.contentType = contentType;
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/internal/HttpReceiverOverHTTP.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/internal/HttpReceiverOverHTTP.java
index 2aea6419805..7179677bff2 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/internal/HttpReceiverOverHTTP.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/internal/HttpReceiverOverHTTP.java
@@ -30,10 +30,10 @@ import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpParser;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersion;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Promise;
import org.slf4j.Logger;
@@ -45,7 +45,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
private final LongAdder inMessages = new LongAdder();
private final HttpParser parser;
- private final RetainableByteBufferPool retainableByteBufferPool;
+ private final ByteBufferPool byteBufferPool;
private RetainableByteBuffer networkBuffer;
private boolean shutdown;
private boolean complete;
@@ -66,7 +66,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
parser.setHeaderCacheSize(httpTransport.getHeaderCacheSize());
parser.setHeaderCacheCaseSensitive(httpTransport.isHeaderCacheCaseSensitive());
}
- retainableByteBufferPool = httpClient.getRetainableByteBufferPool();
+ byteBufferPool = httpClient.getByteBufferPool();
}
void receive()
@@ -197,7 +197,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
{
HttpClient client = getHttpDestination().getHttpClient();
boolean direct = client.isUseInputDirectByteBuffers();
- return retainableByteBufferPool.acquire(client.getResponseBufferSize(), direct);
+ return byteBufferPool.acquire(client.getResponseBufferSize(), direct);
}
private void releaseNetworkBuffer()
diff --git a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/internal/HttpSenderOverHTTP.java b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/internal/HttpSenderOverHTTP.java
index f0fab73ed33..0d05cdf5e29 100644
--- a/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/internal/HttpSenderOverHTTP.java
+++ b/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/internal/HttpSenderOverHTTP.java
@@ -23,10 +23,10 @@ import org.eclipse.jetty.client.transport.HttpSender;
import org.eclipse.jetty.http.HttpGenerator;
import org.eclipse.jetty.http.HttpURI;
import org.eclipse.jetty.http.MetaData;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.IteratingCallback;
@@ -158,7 +158,7 @@ public class HttpSenderOverHTTP extends HttpSender
protected Action process() throws Exception
{
HttpClient httpClient = getHttpChannel().getHttpDestination().getHttpClient();
- RetainableByteBufferPool bufferPool = httpClient.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = httpClient.getByteBufferPool();
boolean useDirectByteBuffers = httpClient.isUseOutputDirectByteBuffers();
while (true)
{
@@ -289,7 +289,7 @@ public class HttpSenderOverHTTP extends HttpSender
protected Action process() throws Exception
{
HttpClient httpClient = getHttpChannel().getHttpDestination().getHttpClient();
- RetainableByteBufferPool bufferPool = httpClient.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = httpClient.getByteBufferPool();
boolean useDirectByteBuffers = httpClient.isUseOutputDirectByteBuffers();
while (true)
{
diff --git a/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientGZIPTest.java b/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientGZIPTest.java
index c9824032702..995a1e1b716 100644
--- a/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientGZIPTest.java
+++ b/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientGZIPTest.java
@@ -28,8 +28,8 @@ import java.util.zip.GZIPOutputStream;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.util.Callback;
@@ -242,7 +242,7 @@ public class HttpClientGZIPTest extends AbstractHttpClientServerTest
}
});
- RetainableByteBufferPool pool = client.getRetainableByteBufferPool();
+ ByteBufferPool pool = client.getByteBufferPool();
assumeTrue(pool instanceof ArrayRetainableByteBufferPool);
ArrayRetainableByteBufferPool bufferPool = (ArrayRetainableByteBufferPool)pool;
diff --git a/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTLSTest.java b/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTLSTest.java
index 74cd82f04e0..ed2a43d8fb3 100644
--- a/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTLSTest.java
+++ b/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTLSTest.java
@@ -45,13 +45,13 @@ import org.eclipse.jetty.http.HttpHeaderValue;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.ConnectionStatistics;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;
import org.eclipse.jetty.io.ssl.SslConnection;
import org.eclipse.jetty.io.ssl.SslHandshakeListener;
@@ -630,7 +630,7 @@ public class HttpClientTLSTest
@Override
protected SslConnection newSslConnection(Connector connector, EndPoint endPoint, SSLEngine engine)
{
- return new SslConnection(connector.getRetainableByteBufferPool(), connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
+ return new SslConnection(connector.getByteBufferPool(), connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@Override
protected int networkFill(ByteBuffer input) throws IOException
@@ -664,10 +664,10 @@ public class HttpClientTLSTest
{
if (sslContextFactory == null)
sslContextFactory = getSslContextFactory();
- return new SslClientConnectionFactory(sslContextFactory, getRetainableByteBufferPool(), getExecutor(), connectionFactory)
+ return new SslClientConnectionFactory(sslContextFactory, getByteBufferPool(), getExecutor(), connectionFactory)
{
@Override
- protected SslConnection newSslConnection(RetainableByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
+ protected SslConnection newSslConnection(ByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
{
return new SslConnection(bufferPool, executor, endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@@ -721,7 +721,7 @@ public class HttpClientTLSTest
@Override
protected SslConnection newSslConnection(Connector connector, EndPoint endPoint, SSLEngine engine)
{
- RetainableByteBufferPool bufferPool = connector.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = connector.getByteBufferPool();
return new SslConnection(bufferPool, connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@Override
@@ -753,7 +753,7 @@ public class HttpClientTLSTest
assertThrows(Exception.class, () -> client.newRequest("localhost", connector.getLocalPort()).scheme(HttpScheme.HTTPS.asString()).send());
- ArrayRetainableByteBufferPool bufferPool = (ArrayRetainableByteBufferPool)server.getRetainableByteBufferPool();
+ ArrayRetainableByteBufferPool bufferPool = (ArrayRetainableByteBufferPool)server.getByteBufferPool();
Pool bucket = bufferPool.poolFor(16 * 1024 + 1, connector.getConnectionFactory(HttpConnectionFactory.class).isUseInputDirectByteBuffers());
assertEquals(1, bucket.size());
assertEquals(1, bucket.getIdleCount());
@@ -769,7 +769,7 @@ public class HttpClientTLSTest
QueuedThreadPool serverThreads = new QueuedThreadPool();
serverThreads.setName("server");
List leakedBuffers = new CopyOnWriteArrayList<>();
- RetainableByteBufferPool bufferPool = new RetainableByteBufferPool.Wrapper(new ArrayRetainableByteBufferPool())
+ ByteBufferPool bufferPool = new ByteBufferPool.Wrapper(new ArrayRetainableByteBufferPool())
{
@Override
public RetainableByteBuffer acquire(int size, boolean direct)
@@ -798,7 +798,7 @@ public class HttpClientTLSTest
@Override
protected SslConnection newSslConnection(Connector connector, EndPoint endPoint, SSLEngine engine)
{
- RetainableByteBufferPool bufferPool = connector.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = connector.getByteBufferPool();
return new SslConnection(bufferPool, connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@Override
@@ -839,7 +839,7 @@ public class HttpClientTLSTest
QueuedThreadPool serverThreads = new QueuedThreadPool();
serverThreads.setName("server");
List leakedBuffers = new CopyOnWriteArrayList<>();
- RetainableByteBufferPool bufferPool = new RetainableByteBufferPool.Wrapper(new ArrayRetainableByteBufferPool())
+ ByteBufferPool bufferPool = new ByteBufferPool.Wrapper(new ArrayRetainableByteBufferPool())
{
@Override
public RetainableByteBuffer acquire(int size, boolean direct)
@@ -869,7 +869,7 @@ public class HttpClientTLSTest
@Override
protected SslConnection newSslConnection(Connector connector, EndPoint endPoint, SSLEngine engine)
{
- RetainableByteBufferPool bufferPool = connector.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = connector.getByteBufferPool();
return new SslConnection(bufferPool, connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@Override
@@ -924,7 +924,7 @@ public class HttpClientTLSTest
QueuedThreadPool serverThreads = new QueuedThreadPool();
serverThreads.setName("server");
List leakedBuffers = new CopyOnWriteArrayList<>();
- RetainableByteBufferPool bufferPool = new RetainableByteBufferPool.Wrapper(new ArrayRetainableByteBufferPool())
+ ByteBufferPool bufferPool = new ByteBufferPool.Wrapper(new ArrayRetainableByteBufferPool())
{
@Override
public RetainableByteBuffer acquire(int size, boolean direct)
@@ -954,7 +954,7 @@ public class HttpClientTLSTest
@Override
protected SslConnection newSslConnection(Connector connector, EndPoint endPoint, SSLEngine engine)
{
- RetainableByteBufferPool bufferPool = connector.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = connector.getByteBufferPool();
return new SslConnection(bufferPool, connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@Override
@@ -1017,7 +1017,7 @@ public class HttpClientTLSTest
@Override
protected SslConnection newSslConnection(Connector connector, EndPoint endPoint, SSLEngine engine)
{
- return new SslConnection(connector.getRetainableByteBufferPool(), connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
+ return new SslConnection(connector.getByteBufferPool(), connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@Override
protected int networkFill(ByteBuffer input) throws IOException
@@ -1052,10 +1052,10 @@ public class HttpClientTLSTest
{
if (sslContextFactory == null)
sslContextFactory = getSslContextFactory();
- return new SslClientConnectionFactory(sslContextFactory, getRetainableByteBufferPool(), getExecutor(), connectionFactory)
+ return new SslClientConnectionFactory(sslContextFactory, getByteBufferPool(), getExecutor(), connectionFactory)
{
@Override
- protected SslConnection newSslConnection(RetainableByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
+ protected SslConnection newSslConnection(ByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
{
return new SslConnection(bufferPool, executor, endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@@ -1114,10 +1114,10 @@ public class HttpClientTLSTest
{
if (sslContextFactory == null)
sslContextFactory = getSslContextFactory();
- return new SslClientConnectionFactory(sslContextFactory, getRetainableByteBufferPool(), getExecutor(), connectionFactory)
+ return new SslClientConnectionFactory(sslContextFactory, getByteBufferPool(), getExecutor(), connectionFactory)
{
@Override
- protected SslConnection newSslConnection(RetainableByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
+ protected SslConnection newSslConnection(ByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
{
return new SslConnection(bufferPool, executor, endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@@ -1158,7 +1158,7 @@ public class HttpClientTLSTest
@Override
protected SslConnection newSslConnection(Connector connector, EndPoint endPoint, SSLEngine engine)
{
- return new SslConnection(connector.getRetainableByteBufferPool(), connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
+ return new SslConnection(connector.getByteBufferPool(), connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@Override
protected SSLEngineResult unwrap(SSLEngine sslEngine, ByteBuffer input, ByteBuffer output) throws SSLException
@@ -1194,10 +1194,10 @@ public class HttpClientTLSTest
{
if (sslContextFactory == null)
sslContextFactory = getSslContextFactory();
- return new SslClientConnectionFactory(sslContextFactory, getRetainableByteBufferPool(), getExecutor(), connectionFactory)
+ return new SslClientConnectionFactory(sslContextFactory, getByteBufferPool(), getExecutor(), connectionFactory)
{
@Override
- protected SslConnection newSslConnection(RetainableByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
+ protected SslConnection newSslConnection(ByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
{
return new SslConnection(bufferPool, executor, endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
diff --git a/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslConnectionTest.java b/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslConnectionTest.java
index bfbd8a1e8a1..ff8caa921c8 100644
--- a/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslConnectionTest.java
+++ b/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslConnectionTest.java
@@ -21,8 +21,8 @@ import javax.net.ssl.SSLHandshakeException;
import org.eclipse.jetty.io.AbstractConnection;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
import org.eclipse.jetty.io.ByteArrayEndPoint;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.ssl.SslConnection;
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.eclipse.jetty.util.BufferUtil;
@@ -43,7 +43,7 @@ public class SslConnectionTest
sslContextFactory.setKeyStorePassword("storepwd");
sslContextFactory.start();
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
QueuedThreadPool threadPool = new QueuedThreadPool();
threadPool.start();
ByteArrayEndPoint endPoint = new ByteArrayEndPoint();
diff --git a/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/util/MultiPartRequestContentTest.java b/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/util/MultiPartRequestContentTest.java
index 198d054346f..21bb2adfab4 100644
--- a/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/util/MultiPartRequestContentTest.java
+++ b/jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/util/MultiPartRequestContentTest.java
@@ -283,7 +283,7 @@ public class MultiPartRequestContentTest extends AbstractHttpClientServerTest
});
MultiPartRequestContent multiPart = new MultiPartRequestContent();
- PathRequestContent content = new PathRequestContent(contentType, tmpPath, client.getRetainableByteBufferPool());
+ PathRequestContent content = new PathRequestContent(contentType, tmpPath, client.getByteBufferPool());
content.setUseDirectByteBuffers(client.isUseOutputDirectByteBuffers());
multiPart.addPart(new MultiPart.ContentSourcePart(name, tmpPath.getFileName().toString(), null, content));
multiPart.close();
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpChannelOverFCGI.java b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpChannelOverFCGI.java
index 950a15f1978..ebda62280b1 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpChannelOverFCGI.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpChannelOverFCGI.java
@@ -24,9 +24,9 @@ import org.eclipse.jetty.fcgi.generator.Flusher;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpVersion;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.IdleTimeout;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.Promise;
import org.slf4j.Logger;
@@ -162,7 +162,7 @@ public class HttpChannelOverFCGI extends HttpChannel
release();
}
- protected void flush(RetainableByteBufferPool.Accumulator accumulator, Callback callback)
+ protected void flush(ByteBufferPool.Accumulator accumulator, Callback callback)
{
flusher.flush(accumulator, callback);
}
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpConnectionOverFCGI.java b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpConnectionOverFCGI.java
index e036b6558c2..21f0c41c755 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpConnectionOverFCGI.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpConnectionOverFCGI.java
@@ -42,10 +42,10 @@ import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpHeaderValue;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.Attachable;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Promise;
@@ -57,7 +57,7 @@ public class HttpConnectionOverFCGI extends AbstractConnection implements IConne
{
private static final Logger LOG = LoggerFactory.getLogger(HttpConnectionOverFCGI.class);
- private final RetainableByteBufferPool networkByteBufferPool;
+ private final ByteBufferPool networkByteBufferPool;
private final AutoLock lock = new AutoLock();
private final LinkedList requests = new LinkedList<>();
private final AtomicBoolean closed = new AtomicBoolean();
@@ -81,7 +81,7 @@ public class HttpConnectionOverFCGI extends AbstractConnection implements IConne
this.parser = new ClientParser(new ResponseListener());
requests.addLast(0);
HttpClient client = destination.getHttpClient();
- this.networkByteBufferPool = client.getRetainableByteBufferPool();
+ this.networkByteBufferPool = client.getByteBufferPool();
}
public HttpDestination getHttpDestination()
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpSenderOverFCGI.java b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpSenderOverFCGI.java
index 2b500d0de69..3e1fc386232 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpSenderOverFCGI.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/transport/internal/HttpSenderOverFCGI.java
@@ -29,7 +29,7 @@ import org.eclipse.jetty.fcgi.generator.ClientGenerator;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.Jetty;
import org.eclipse.jetty.util.StringUtil;
@@ -42,7 +42,7 @@ public class HttpSenderOverFCGI extends HttpSender
{
super(channel);
HttpClient httpClient = channel.getHttpDestination().getHttpClient();
- this.generator = new ClientGenerator(httpClient.getRetainableByteBufferPool(), httpClient.isUseOutputDirectByteBuffers());
+ this.generator = new ClientGenerator(httpClient.getByteBufferPool(), httpClient.isUseOutputDirectByteBuffers());
}
@Override
@@ -98,7 +98,7 @@ public class HttpSenderOverFCGI extends HttpSender
HttpClientTransportOverFCGI transport = (HttpClientTransportOverFCGI)getHttpChannel().getHttpDestination().getHttpClient().getTransport();
transport.customize(request, fcgiHeaders);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
int id = getHttpChannel().getRequest();
if (contentBuffer.hasRemaining() || lastContent)
{
@@ -117,7 +117,7 @@ public class HttpSenderOverFCGI extends HttpSender
{
if (contentBuffer.hasRemaining() || lastContent)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
int request = getHttpChannel().getRequest();
generator.generateRequestContent(accumulator, request, contentBuffer, lastContent);
getHttpChannel().flush(accumulator, callback);
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/ClientGenerator.java b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/ClientGenerator.java
index 7688c3fff65..9eeb330b410 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/ClientGenerator.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/ClientGenerator.java
@@ -22,8 +22,8 @@ import java.util.List;
import org.eclipse.jetty.fcgi.FCGI;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class ClientGenerator extends Generator
@@ -33,17 +33,17 @@ public class ClientGenerator extends Generator
// 0x7F_FF - 4 (the 4 is to make room for the name (or value) length).
public static final int MAX_PARAM_LENGTH = 0x7F_FF - 4;
- public ClientGenerator(RetainableByteBufferPool bufferPool)
+ public ClientGenerator(ByteBufferPool bufferPool)
{
this(bufferPool, true);
}
- public ClientGenerator(RetainableByteBufferPool bufferPool, boolean useDirectByteBuffers)
+ public ClientGenerator(ByteBufferPool bufferPool, boolean useDirectByteBuffers)
{
super(bufferPool, useDirectByteBuffers);
}
- public void generateRequestHeaders(RetainableByteBufferPool.Accumulator accumulator, int request, HttpFields fields)
+ public void generateRequestHeaders(ByteBufferPool.Accumulator accumulator, int request, HttpFields fields)
{
request &= 0xFF_FF;
@@ -79,7 +79,7 @@ public class ClientGenerator extends Generator
// One FCGI_BEGIN_REQUEST + N FCGI_PARAMS + one last FCGI_PARAMS
- RetainableByteBuffer beginBuffer = getRetainableByteBufferPool().acquire(16, isUseDirectByteBuffers());
+ RetainableByteBuffer beginBuffer = getByteBufferPool().acquire(16, isUseDirectByteBuffers());
accumulator.append(beginBuffer);
ByteBuffer beginByteBuffer = beginBuffer.getByteBuffer();
BufferUtil.clearToFill(beginByteBuffer);
@@ -95,7 +95,7 @@ public class ClientGenerator extends Generator
while (fieldsLength > 0)
{
int capacity = 8 + Math.min(maxCapacity, fieldsLength);
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(capacity, isUseDirectByteBuffers());
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(capacity, isUseDirectByteBuffers());
accumulator.append(buffer);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
@@ -133,7 +133,7 @@ public class ClientGenerator extends Generator
BufferUtil.flipToFlush(byteBuffer, 0);
}
- RetainableByteBuffer lastBuffer = getRetainableByteBufferPool().acquire(8, isUseDirectByteBuffers());
+ RetainableByteBuffer lastBuffer = getByteBufferPool().acquire(8, isUseDirectByteBuffers());
accumulator.append(lastBuffer);
ByteBuffer lastByteBuffer = lastBuffer.getByteBuffer();
BufferUtil.clearToFill(lastByteBuffer);
@@ -159,7 +159,7 @@ public class ClientGenerator extends Generator
return length > 127 ? 4 : 1;
}
- public void generateRequestContent(RetainableByteBufferPool.Accumulator accumulator, int request, ByteBuffer content, boolean lastContent)
+ public void generateRequestContent(ByteBufferPool.Accumulator accumulator, int request, ByteBuffer content, boolean lastContent)
{
generateContent(accumulator, request, content, lastContent, FCGI.FrameType.STDIN);
}
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Flusher.java b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Flusher.java
index 58ebcb0e74d..6f5d6721811 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Flusher.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Flusher.java
@@ -18,8 +18,8 @@ import java.util.ArrayDeque;
import java.util.List;
import java.util.Queue;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.IteratingCallback;
import org.eclipse.jetty.util.thread.AutoLock;
@@ -40,7 +40,7 @@ public class Flusher
this.endPoint = endPoint;
}
- public void flush(RetainableByteBufferPool.Accumulator accumulator, Callback callback)
+ public void flush(ByteBufferPool.Accumulator accumulator, Callback callback)
{
offer(new Entry(accumulator, callback));
flushCallback.iterate();
@@ -126,7 +126,7 @@ public class Flusher
}
}
- private record Entry(RetainableByteBufferPool.Accumulator accumulator, Callback callback) implements Callback
+ private record Entry(ByteBufferPool.Accumulator accumulator, Callback callback) implements Callback
{
@Override
public void succeeded()
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Generator.java b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Generator.java
index 9031b2c8eed..db69cd3ca8a 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Generator.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Generator.java
@@ -16,24 +16,24 @@ package org.eclipse.jetty.fcgi.generator;
import java.nio.ByteBuffer;
import org.eclipse.jetty.fcgi.FCGI;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class Generator
{
public static final int MAX_CONTENT_LENGTH = 0xFF_FF;
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final boolean useDirectByteBuffers;
- public Generator(RetainableByteBufferPool bufferPool, boolean useDirectByteBuffers)
+ public Generator(ByteBufferPool bufferPool, boolean useDirectByteBuffers)
{
this.bufferPool = bufferPool;
this.useDirectByteBuffers = useDirectByteBuffers;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
@@ -43,7 +43,7 @@ public class Generator
return useDirectByteBuffers;
}
- protected void generateContent(RetainableByteBufferPool.Accumulator accumulator, int id, ByteBuffer content, boolean lastContent, FCGI.FrameType frameType)
+ protected void generateContent(ByteBufferPool.Accumulator accumulator, int id, ByteBuffer content, boolean lastContent, FCGI.FrameType frameType)
{
id &= 0xFF_FF;
@@ -51,7 +51,7 @@ public class Generator
while (contentLength > 0 || lastContent)
{
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(8, isUseDirectByteBuffers());
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(8, isUseDirectByteBuffers());
accumulator.append(buffer);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/ServerGenerator.java b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/ServerGenerator.java
index de752e0335f..c1cc2d166cc 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/ServerGenerator.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/ServerGenerator.java
@@ -23,8 +23,8 @@ import org.eclipse.jetty.fcgi.FCGI;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpStatus;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class ServerGenerator extends Generator
@@ -35,18 +35,18 @@ public class ServerGenerator extends Generator
private final boolean sendStatus200;
- public ServerGenerator(RetainableByteBufferPool bufferPool)
+ public ServerGenerator(ByteBufferPool bufferPool)
{
this(bufferPool, true, true);
}
- public ServerGenerator(RetainableByteBufferPool bufferPool, boolean useDirectByteBuffers, boolean sendStatus200)
+ public ServerGenerator(ByteBufferPool bufferPool, boolean useDirectByteBuffers, boolean sendStatus200)
{
super(bufferPool, useDirectByteBuffers);
this.sendStatus200 = sendStatus200;
}
- public void generateResponseHeaders(RetainableByteBufferPool.Accumulator accumulator, int request, int code, String reason, HttpFields fields)
+ public void generateResponseHeaders(ByteBufferPool.Accumulator accumulator, int request, int code, String reason, HttpFields fields)
{
request &= 0xFF_FF;
@@ -97,7 +97,7 @@ public class ServerGenerator extends Generator
generateContent(accumulator, request, byteBuffer, false, FCGI.FrameType.STDOUT);
}
- public void generateResponseContent(RetainableByteBufferPool.Accumulator accumulator, int request, ByteBuffer content, boolean lastContent, boolean aborted)
+ public void generateResponseContent(ByteBufferPool.Accumulator accumulator, int request, ByteBuffer content, boolean lastContent, boolean aborted)
{
if (aborted)
{
@@ -117,7 +117,7 @@ public class ServerGenerator extends Generator
private RetainableByteBuffer generateEndRequest(int request, boolean aborted)
{
request &= 0xFF_FF;
- RetainableByteBuffer endRequestBuffer = getRetainableByteBufferPool().acquire(16, isUseDirectByteBuffers());
+ RetainableByteBuffer endRequestBuffer = getByteBufferPool().acquire(16, isUseDirectByteBuffers());
ByteBuffer byteBuffer = endRequestBuffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
byteBuffer.putInt(0x01_03_00_00 + request);
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/test/java/org/eclipse/jetty/fcgi/generator/ClientGeneratorTest.java b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/test/java/org/eclipse/jetty/fcgi/generator/ClientGeneratorTest.java
index 4ffe773ba97..b7693f41dc0 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/test/java/org/eclipse/jetty/fcgi/generator/ClientGeneratorTest.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/test/java/org/eclipse/jetty/fcgi/generator/ClientGeneratorTest.java
@@ -22,7 +22,7 @@ import org.eclipse.jetty.fcgi.parser.ServerParser;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -59,9 +59,9 @@ public class ClientGeneratorTest
String longLongValue = new String(chars);
fields.put(new HttpField(longLongName, longLongValue));
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
ClientGenerator generator = new ClientGenerator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
int id = 13;
generator.generateRequestHeaders(accumulator, id, fields);
@@ -157,9 +157,9 @@ public class ClientGeneratorTest
{
ByteBuffer content = ByteBuffer.allocate(contentLength);
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
ClientGenerator generator = new ClientGenerator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
int id = 13;
generator.generateRequestContent(accumulator, id, content, true);
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/test/java/org/eclipse/jetty/fcgi/parser/ClientParserTest.java b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/test/java/org/eclipse/jetty/fcgi/parser/ClientParserTest.java
index 64f2b48e52a..246121d8427 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-client/src/test/java/org/eclipse/jetty/fcgi/parser/ClientParserTest.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-client/src/test/java/org/eclipse/jetty/fcgi/parser/ClientParserTest.java
@@ -23,7 +23,7 @@ import org.eclipse.jetty.fcgi.generator.ServerGenerator;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -44,9 +44,9 @@ public class ClientParserTest
String contentTypeValue = "text/html;charset=utf-8";
fields.put(contentTypeName, contentTypeValue);
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
ServerGenerator generator = new ServerGenerator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateResponseHeaders(accumulator, id, statusCode, statusMessage, fields);
// Use the fundamental theorem of arithmetic to test the results.
@@ -108,9 +108,9 @@ public class ClientParserTest
HttpFields fields = HttpFields.build()
.put("Content-Length", "0");
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
ServerGenerator generator = new ServerGenerator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateResponseHeaders(accumulator, id, 200, "OK", fields);
generator.generateResponseContent(accumulator, id, null, true, false);
@@ -158,9 +158,9 @@ public class ClientParserTest
String contentTypeValue = String.valueOf(contentLength);
fields.put(contentTypeName, contentTypeValue);
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
ServerGenerator generator = new ServerGenerator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateResponseHeaders(accumulator, id, code, "OK", fields);
generator.generateResponseContent(accumulator, id, content, true, false);
@@ -209,9 +209,9 @@ public class ClientParserTest
String contentTypeValue = String.valueOf(contentLength);
fields.put(contentTypeName, contentTypeValue);
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
ServerGenerator generator = new ServerGenerator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateResponseHeaders(accumulator, id, code, "OK", fields);
generator.generateResponseContent(accumulator, id, content, true, false);
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/HttpStreamOverFCGI.java b/jetty-core/jetty-fcgi/jetty-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/HttpStreamOverFCGI.java
index 964ade042da..b4a185e774b 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/HttpStreamOverFCGI.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/HttpStreamOverFCGI.java
@@ -28,8 +28,8 @@ import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.http.MetaData;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.HttpChannel;
import org.eclipse.jetty.server.HttpStream;
import org.eclipse.jetty.util.BufferUtil;
@@ -229,7 +229,7 @@ public class HttpStreamOverFCGI implements HttpStream
{
if (last)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generateResponseContent(accumulator, true, BufferUtil.EMPTY_BUFFER);
flusher.flush(accumulator, callback);
}
@@ -241,7 +241,7 @@ public class HttpStreamOverFCGI implements HttpStream
}
else
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generateResponseContent(accumulator, last, content);
flusher.flush(accumulator, callback);
}
@@ -260,8 +260,8 @@ public class HttpStreamOverFCGI implements HttpStream
boolean shutdown = _shutdown = info.getFields().contains(HttpHeader.CONNECTION, HttpHeaderValue.CLOSE.asString());
- RetainableByteBufferPool bufferPool = _generator.getRetainableByteBufferPool();
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool bufferPool = _generator.getByteBufferPool();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
Flusher flusher = _connection.getFlusher();
if (head)
{
@@ -288,12 +288,12 @@ public class HttpStreamOverFCGI implements HttpStream
flusher.shutdown();
}
- private void generateResponseHeaders(RetainableByteBufferPool.Accumulator accumulator, MetaData.Response info)
+ private void generateResponseHeaders(ByteBufferPool.Accumulator accumulator, MetaData.Response info)
{
_generator.generateResponseHeaders(accumulator, _id, info.getStatus(), info.getReason(), info.getFields());
}
- private void generateResponseContent(RetainableByteBufferPool.Accumulator accumulator, boolean last, ByteBuffer buffer)
+ private void generateResponseContent(ByteBufferPool.Accumulator accumulator, boolean last, ByteBuffer buffer)
{
_generator.generateResponseContent(accumulator, _id, buffer, last, _aborted);
}
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/ServerFCGIConnection.java b/jetty-core/jetty-fcgi/jetty-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/ServerFCGIConnection.java
index c1c6fc75eba..79949e4016b 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/ServerFCGIConnection.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/ServerFCGIConnection.java
@@ -26,11 +26,11 @@ import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.ConnectionMetaData;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.HttpChannel;
@@ -48,7 +48,7 @@ public class ServerFCGIConnection extends AbstractConnection implements Connecti
private final HttpChannel.Factory httpChannelFactory = new HttpChannel.DefaultFactory();
private final Attributes attributes = new Lazy();
private final Connector connector;
- private final RetainableByteBufferPool networkByteBufferPool;
+ private final ByteBufferPool networkByteBufferPool;
private final boolean sendStatus200;
private final Flusher flusher;
private final HttpConfiguration configuration;
@@ -63,7 +63,7 @@ public class ServerFCGIConnection extends AbstractConnection implements Connecti
{
super(endPoint, connector.getExecutor());
this.connector = connector;
- this.networkByteBufferPool = connector.getRetainableByteBufferPool();
+ this.networkByteBufferPool = connector.getByteBufferPool();
this.flusher = new Flusher(endPoint);
this.configuration = configuration;
this.sendStatus200 = sendStatus200;
@@ -333,7 +333,7 @@ public class ServerFCGIConnection extends AbstractConnection implements Connecti
if (stream != null)
throw new UnsupportedOperationException("FastCGI Multiplexing");
HttpChannel channel = httpChannelFactory.newHttpChannel(ServerFCGIConnection.this);
- ServerGenerator generator = new ServerGenerator(connector.getRetainableByteBufferPool(), isUseOutputDirectByteBuffers(), sendStatus200);
+ ServerGenerator generator = new ServerGenerator(connector.getByteBufferPool(), isUseOutputDirectByteBuffers(), sendStatus200);
stream = new HttpStreamOverFCGI(ServerFCGIConnection.this, generator, channel, request);
channel.setHttpStream(stream);
if (LOG.isDebugEnabled())
diff --git a/jetty-core/jetty-fcgi/jetty-fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/AbstractHttpClientServerTest.java b/jetty-core/jetty-fcgi/jetty-fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/AbstractHttpClientServerTest.java
index d35e81805b5..2764ed3d2cd 100644
--- a/jetty-core/jetty-fcgi/jetty-fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/AbstractHttpClientServerTest.java
+++ b/jetty-core/jetty-fcgi/jetty-fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/AbstractHttpClientServerTest.java
@@ -22,8 +22,8 @@ import org.eclipse.jetty.client.LeakTrackingConnectionPool;
import org.eclipse.jetty.fcgi.client.transport.HttpClientTransportOverFCGI;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.Server;
@@ -38,8 +38,8 @@ import static org.hamcrest.MatcherAssert.assertThat;
public abstract class AbstractHttpClientServerTest
{
- private RetainableByteBufferPool serverBufferPool;
- protected RetainableByteBufferPool clientBufferPool;
+ private ByteBufferPool serverBufferPool;
+ protected ByteBufferPool clientBufferPool;
private final AtomicLong connectionLeaks = new AtomicLong();
protected Server server;
protected ServerConnector connector;
@@ -68,7 +68,7 @@ public abstract class AbstractHttpClientServerTest
// TODO: restore leak tracking.
if (clientBufferPool == null)
clientBufferPool = new ArrayRetainableByteBufferPool();
- clientConnector.setRetainableByteBufferPool(clientBufferPool);
+ clientConnector.setByteBufferPool(clientBufferPool);
HttpClientTransport transport = new HttpClientTransportOverFCGI(clientConnector, "");
transport.setConnectionPoolFactory(destination -> new LeakTrackingConnectionPool(destination, client.getMaxConnectionsPerDestination())
{
diff --git a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/GZIPContentDecoder.java b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/GZIPContentDecoder.java
index b176ba3bb82..4e18315f5d4 100644
--- a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/GZIPContentDecoder.java
+++ b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/GZIPContentDecoder.java
@@ -20,8 +20,8 @@ import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
import java.util.zip.ZipException;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.component.Destroyable;
import org.eclipse.jetty.util.compression.InflaterPool;
@@ -37,7 +37,7 @@ public class GZIPContentDecoder implements Destroyable
private static final long UINT_MAX = 0xFFFFFFFFL;
private final List _inflateds = new ArrayList<>();
- private final RetainableByteBufferPool _pool;
+ private final ByteBufferPool _pool;
private final int _bufferSize;
private InflaterPool.Entry _inflaterEntry;
private Inflater _inflater;
@@ -57,17 +57,17 @@ public class GZIPContentDecoder implements Destroyable
this(null, bufferSize);
}
- public GZIPContentDecoder(RetainableByteBufferPool retainableByteBufferPool, int bufferSize)
+ public GZIPContentDecoder(ByteBufferPool byteBufferPool, int bufferSize)
{
- this(new InflaterPool(0, true), retainableByteBufferPool, bufferSize);
+ this(new InflaterPool(0, true), byteBufferPool, bufferSize);
}
- public GZIPContentDecoder(InflaterPool inflaterPool, RetainableByteBufferPool retainableByteBufferPool, int bufferSize)
+ public GZIPContentDecoder(InflaterPool inflaterPool, ByteBufferPool byteBufferPool, int bufferSize)
{
_inflaterEntry = inflaterPool.acquire();
_inflater = _inflaterEntry.get();
_bufferSize = bufferSize;
- _pool = retainableByteBufferPool != null ? retainableByteBufferPool : new RetainableByteBufferPool.NonPooling();
+ _pool = byteBufferPool != null ? byteBufferPool : new ByteBufferPool.NonPooling();
reset();
}
diff --git a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java
index 120e26ee903..6268f267920 100644
--- a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java
+++ b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java
@@ -30,9 +30,9 @@ import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.MimeTypes;
import org.eclipse.jetty.http.PreEncodedHttpField;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Retainable;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.NanoTime;
import org.eclipse.jetty.util.StringUtil;
@@ -69,16 +69,16 @@ public class CachingHttpContentFactory implements HttpContent.Factory
private final HttpContent.Factory _authority;
private final ConcurrentHashMap _cache = new ConcurrentHashMap<>();
private final AtomicLong _cachedSize = new AtomicLong();
- private final RetainableByteBufferPool _bufferPool;
+ private final ByteBufferPool _bufferPool;
private int _maxCachedFileSize = DEFAULT_MAX_CACHED_FILE_SIZE;
private int _maxCachedFiles = DEFAULT_MAX_CACHED_FILES;
private long _maxCacheSize = DEFAULT_MAX_CACHE_SIZE;
private boolean _useDirectByteBuffers = true;
- public CachingHttpContentFactory(HttpContent.Factory authority, RetainableByteBufferPool bufferPool)
+ public CachingHttpContentFactory(HttpContent.Factory authority, ByteBufferPool bufferPool)
{
_authority = authority;
- _bufferPool = bufferPool != null ? bufferPool : new RetainableByteBufferPool.NonPooling();
+ _bufferPool = bufferPool != null ? bufferPool : new ByteBufferPool.NonPooling();
}
protected ConcurrentMap getCache()
diff --git a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/ValidatingCachingHttpContentFactory.java b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/ValidatingCachingHttpContentFactory.java
index b3dea606cf7..953f48bccb7 100644
--- a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/ValidatingCachingHttpContentFactory.java
+++ b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/ValidatingCachingHttpContentFactory.java
@@ -19,7 +19,7 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.NanoTime;
import org.eclipse.jetty.util.annotation.Name;
import org.eclipse.jetty.util.thread.Scheduler;
@@ -55,11 +55,11 @@ public class ValidatingCachingHttpContentFactory extends CachingHttpContentFacto
*
* @param authority the wrapped {@link HttpContent.Factory} to use.
* @param validationPeriod time between filesystem checks in ms to see if an {@link HttpContent} is still valid (-1 never validate, 0 always validate).
- * @param bufferPool the {@link org.eclipse.jetty.io.RetainableByteBufferPool} to use.
+ * @param bufferPool the {@link org.eclipse.jetty.io.ByteBufferPool} to use.
*/
public ValidatingCachingHttpContentFactory(@Name("authority") HttpContent.Factory authority,
@Name("validationPeriod") long validationPeriod,
- @Name("bufferPool") RetainableByteBufferPool bufferPool)
+ @Name("bufferPool") ByteBufferPool bufferPool)
{
this(authority, validationPeriod, bufferPool, null, -1, -1);
}
@@ -70,14 +70,14 @@ public class ValidatingCachingHttpContentFactory extends CachingHttpContentFacto
*
* @param authority the wrapped {@link HttpContent.Factory} to use.
* @param validationPeriod time between filesystem checks in ms to see if an {@link HttpContent} is still valid (-1 never validate, 0 always validate).
- * @param bufferPool the {@link org.eclipse.jetty.io.RetainableByteBufferPool} to use.
+ * @param bufferPool the {@link org.eclipse.jetty.io.ByteBufferPool} to use.
* @param scheduler scheduler to use for the sweeper, can be null to not use sweeper.
* @param sweepPeriod time between runs of the sweeper in ms (if 0 never sweep for invalid entries).
* @param idleTimeout amount of time in ms an entry can be unused before evicted by the sweeper (if 0 never evict unused entries).
*/
public ValidatingCachingHttpContentFactory(@Name("authority") HttpContent.Factory authority,
@Name("validationPeriod") long validationPeriod,
- @Name("byteBufferPool") RetainableByteBufferPool bufferPool,
+ @Name("byteBufferPool") ByteBufferPool bufferPool,
@Name("scheduler") Scheduler scheduler,
@Name("sweepPeriod") long sweepPeriod,
@Name("idleTimeout") long idleTimeout)
diff --git a/jetty-core/jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java b/jetty-core/jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java
index 75e4161d423..5c115ace46b 100644
--- a/jetty-core/jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java
+++ b/jetty-core/jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java
@@ -24,8 +24,8 @@ import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -42,12 +42,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class GZIPContentDecoderTest
{
private final AtomicInteger counter = new AtomicInteger();
- private RetainableByteBufferPool pool;
+ private ByteBufferPool pool;
@BeforeEach
public void before()
{
- pool = new RetainableByteBufferPool.Wrapper(new ArrayRetainableByteBufferPool())
+ pool = new ByteBufferPool.Wrapper(new ArrayRetainableByteBufferPool())
{
@Override
public RetainableByteBuffer acquire(int size, boolean direct)
diff --git a/jetty-core/jetty-http2/jetty-http2-client-transport/src/main/java/org/eclipse/jetty/http2/client/transport/HttpClientTransportOverHTTP2.java b/jetty-core/jetty-http2/jetty-http2-client-transport/src/main/java/org/eclipse/jetty/http2/client/transport/HttpClientTransportOverHTTP2.java
index 5344ccc9efb..a81699b3d00 100644
--- a/jetty-core/jetty-http2/jetty-http2-client-transport/src/main/java/org/eclipse/jetty/http2/client/transport/HttpClientTransportOverHTTP2.java
+++ b/jetty-core/jetty-http2/jetty-http2-client-transport/src/main/java/org/eclipse/jetty/http2/client/transport/HttpClientTransportOverHTTP2.java
@@ -90,7 +90,7 @@ public class HttpClientTransportOverHTTP2 extends AbstractHttpClientTransport
HttpClient httpClient = getHttpClient();
client.setExecutor(httpClient.getExecutor());
client.setScheduler(httpClient.getScheduler());
- client.setRetainableByteBufferPool(httpClient.getRetainableByteBufferPool());
+ client.setByteBufferPool(httpClient.getByteBufferPool());
client.setConnectTimeout(httpClient.getConnectTimeout());
client.setIdleTimeout(httpClient.getIdleTimeout());
client.setInputBufferSize(httpClient.getResponseBufferSize());
diff --git a/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2Client.java b/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2Client.java
index 2d488a23e8c..368d3009d60 100644
--- a/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2Client.java
+++ b/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2Client.java
@@ -28,9 +28,9 @@ import org.eclipse.jetty.http2.FlowControlStrategy;
import org.eclipse.jetty.http2.api.Session;
import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.SettingsFrame;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;
import org.eclipse.jetty.util.Promise;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
@@ -153,14 +153,14 @@ public class HTTP2Client extends ContainerLifeCycle
connector.setScheduler(scheduler);
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return connector.getRetainableByteBufferPool();
+ return connector.getByteBufferPool();
}
- public void setRetainableByteBufferPool(RetainableByteBufferPool bufferPool)
+ public void setByteBufferPool(ByteBufferPool bufferPool)
{
- connector.setRetainableByteBufferPool(bufferPool);
+ connector.setByteBufferPool(bufferPool);
}
public FlowControlStrategy.Factory getFlowControlStrategyFactory()
@@ -435,7 +435,7 @@ public class HTTP2Client extends ContainerLifeCycle
{
if (isUseALPN())
factory = new ALPNClientConnectionFactory(getExecutor(), factory, getProtocols());
- factory = new SslClientConnectionFactory(sslContextFactory, getRetainableByteBufferPool(), getExecutor(), factory);
+ factory = new SslClientConnectionFactory(sslContextFactory, getByteBufferPool(), getExecutor(), factory);
}
return factory;
}
diff --git a/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java b/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java
index cf5453c3dec..1a7482fcfb7 100644
--- a/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java
+++ b/jetty-core/jetty-http2/jetty-http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java
@@ -28,10 +28,10 @@ import org.eclipse.jetty.http2.frames.SettingsFrame;
import org.eclipse.jetty.http2.frames.WindowUpdateFrame;
import org.eclipse.jetty.http2.generator.Generator;
import org.eclipse.jetty.http2.parser.Parser;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.Promise;
import org.eclipse.jetty.util.thread.Scheduler;
@@ -48,7 +48,7 @@ public class HTTP2ClientConnectionFactory implements ClientConnectionFactory
public Connection newConnection(EndPoint endPoint, Map context)
{
HTTP2Client client = (HTTP2Client)context.get(CLIENT_CONTEXT_KEY);
- RetainableByteBufferPool bufferPool = client.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = client.getByteBufferPool();
Executor executor = client.getExecutor();
Scheduler scheduler = client.getScheduler();
Session.Listener listener = (Session.Listener)context.get(SESSION_LISTENER_CONTEXT_KEY);
@@ -81,9 +81,9 @@ public class HTTP2ClientConnectionFactory implements ClientConnectionFactory
private final Promise promise;
private final Session.Listener listener;
- private HTTP2ClientConnection(HTTP2Client client, RetainableByteBufferPool retainableByteBufferPool, Executor executor, EndPoint endpoint, Parser parser, HTTP2Session session, int bufferSize, Promise promise, Session.Listener listener)
+ private HTTP2ClientConnection(HTTP2Client client, ByteBufferPool byteBufferPool, Executor executor, EndPoint endpoint, Parser parser, HTTP2Session session, int bufferSize, Promise promise, Session.Listener listener)
{
- super(retainableByteBufferPool, executor, endpoint, parser, session, bufferSize);
+ super(byteBufferPool, executor, endpoint, parser, session, bufferSize);
this.client = client;
this.promise = promise;
this.listener = listener;
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Connection.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Connection.java
index c26d84f701b..afca887f7a2 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Connection.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Connection.java
@@ -24,11 +24,11 @@ import org.eclipse.jetty.http2.api.Stream;
import org.eclipse.jetty.http2.frames.DataFrame;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.Retainable;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.WriteFlusher;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
@@ -47,7 +47,7 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
private final Queue tasks = new ArrayDeque<>();
private final HTTP2Producer producer = new HTTP2Producer();
private final AtomicLong bytesIn = new AtomicLong();
- private final RetainableByteBufferPool retainableByteBufferPool;
+ private final ByteBufferPool byteBufferPool;
private final Parser parser;
private final HTTP2Session session;
private final int bufferSize;
@@ -55,10 +55,10 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
private boolean useInputDirectByteBuffers;
private boolean useOutputDirectByteBuffers;
- protected HTTP2Connection(RetainableByteBufferPool retainableByteBufferPool, Executor executor, EndPoint endPoint, Parser parser, HTTP2Session session, int bufferSize)
+ protected HTTP2Connection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, Parser parser, HTTP2Session session, int bufferSize)
{
super(endPoint, executor);
- this.retainableByteBufferPool = retainableByteBufferPool;
+ this.byteBufferPool = byteBufferPool;
this.parser = parser;
this.session = session;
this.bufferSize = bufferSize;
@@ -450,7 +450,7 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
private NetworkBuffer()
{
- delegate = retainableByteBufferPool.acquire(bufferSize, isUseInputDirectByteBuffers());
+ delegate = byteBufferPool.acquire(bufferSize, isUseInputDirectByteBuffers());
}
public ByteBuffer getBuffer()
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java
index 5a890fedf33..2eef1a1ed74 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java
@@ -56,9 +56,9 @@ import org.eclipse.jetty.http2.generator.Generator;
import org.eclipse.jetty.http2.hpack.HpackException;
import org.eclipse.jetty.http2.internal.HTTP2Flusher;
import org.eclipse.jetty.http2.parser.Parser;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.CyclicTimeouts;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.WriteFlusher;
import org.eclipse.jetty.util.AtomicBiInteger;
import org.eclipse.jetty.util.Atomics;
@@ -1208,7 +1208,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements Session
return 0;
}
- public abstract boolean generate(RetainableByteBufferPool.Accumulator accumulator) throws HpackException;
+ public abstract boolean generate(ByteBufferPool.Accumulator accumulator) throws HpackException;
public abstract long onFlushed(long bytes) throws IOException;
@@ -1295,7 +1295,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements Session
}
@Override
- public boolean generate(RetainableByteBufferPool.Accumulator accumulator) throws HpackException
+ public boolean generate(ByteBufferPool.Accumulator accumulator) throws HpackException
{
frameBytes = generator.control(accumulator, frame);
beforeSend();
@@ -1409,7 +1409,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements Session
}
@Override
- public boolean generate(RetainableByteBufferPool.Accumulator accumulator)
+ public boolean generate(ByteBufferPool.Accumulator accumulator)
{
int dataRemaining = getDataBytesRemaining();
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/DataGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/DataGenerator.java
index 9f6c2fc19e4..1afad970775 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/DataGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/DataGenerator.java
@@ -19,8 +19,8 @@ import org.eclipse.jetty.http2.frames.DataFrame;
import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.internal.Flags;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class DataGenerator
@@ -32,12 +32,12 @@ public class DataGenerator
this.headerGenerator = headerGenerator;
}
- public int generate(RetainableByteBufferPool.Accumulator accumulator, DataFrame frame, int maxLength)
+ public int generate(ByteBufferPool.Accumulator accumulator, DataFrame frame, int maxLength)
{
return generateData(accumulator, frame.getStreamId(), frame.getByteBuffer(), frame.isEndStream(), maxLength);
}
- public int generateData(RetainableByteBufferPool.Accumulator accumulator, int streamId, ByteBuffer data, boolean last, int maxLength)
+ public int generateData(ByteBufferPool.Accumulator accumulator, int streamId, ByteBuffer data, boolean last, int maxLength)
{
if (streamId < 0)
throw new IllegalArgumentException("Invalid stream id: " + streamId);
@@ -62,7 +62,7 @@ public class DataGenerator
return Frame.HEADER_LENGTH + length;
}
- private void generateFrame(RetainableByteBufferPool.Accumulator accumulator, int streamId, ByteBuffer data, boolean last)
+ private void generateFrame(ByteBufferPool.Accumulator accumulator, int streamId, ByteBuffer data, boolean last)
{
int length = data.remaining();
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/FrameGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/FrameGenerator.java
index f3d9c8c5095..a98d1e260aa 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/FrameGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/FrameGenerator.java
@@ -20,8 +20,8 @@ import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.hpack.HpackEncoder;
import org.eclipse.jetty.http2.hpack.HpackException;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public abstract class FrameGenerator
@@ -33,7 +33,7 @@ public abstract class FrameGenerator
this.headerGenerator = headerGenerator;
}
- public abstract int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame) throws HpackException;
+ public abstract int generate(ByteBufferPool.Accumulator accumulator, Frame frame) throws HpackException;
protected RetainableByteBuffer generateHeader(FrameType frameType, int length, int flags, int streamId)
{
@@ -52,7 +52,7 @@ public abstract class FrameGenerator
protected RetainableByteBuffer encode(HpackEncoder encoder, MetaData metaData, int maxFrameSize) throws HpackException
{
- RetainableByteBuffer hpacked = headerGenerator.getRetainableByteBufferPool().acquire(maxFrameSize, isUseDirectByteBuffers());
+ RetainableByteBuffer hpacked = headerGenerator.getByteBufferPool().acquire(maxFrameSize, isUseDirectByteBuffers());
try
{
ByteBuffer byteBuffer = hpacked.getByteBuffer();
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/Generator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/Generator.java
index 51851cd2a3a..e9b7e3e8417 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/Generator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/Generator.java
@@ -18,27 +18,27 @@ import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.hpack.HpackEncoder;
import org.eclipse.jetty.http2.hpack.HpackException;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public class Generator
{
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final HeaderGenerator headerGenerator;
private final HpackEncoder hpackEncoder;
private final FrameGenerator[] generators;
private final DataGenerator dataGenerator;
- public Generator(RetainableByteBufferPool bufferPool)
+ public Generator(ByteBufferPool bufferPool)
{
this(bufferPool, 4096, 0);
}
- public Generator(RetainableByteBufferPool bufferPool, int maxDynamicTableSize, int maxHeaderBlockFragment)
+ public Generator(ByteBufferPool bufferPool, int maxDynamicTableSize, int maxHeaderBlockFragment)
{
this(bufferPool, true, maxDynamicTableSize, maxHeaderBlockFragment);
}
- public Generator(RetainableByteBufferPool bufferPool, boolean useDirectByteBuffers, int maxDynamicTableSize, int maxHeaderBlockFragment)
+ public Generator(ByteBufferPool bufferPool, boolean useDirectByteBuffers, int maxDynamicTableSize, int maxHeaderBlockFragment)
{
this.bufferPool = bufferPool;
@@ -61,7 +61,7 @@ public class Generator
this.dataGenerator = new DataGenerator(headerGenerator);
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
@@ -81,12 +81,12 @@ public class Generator
headerGenerator.setMaxFrameSize(maxFrameSize);
}
- public int control(RetainableByteBufferPool.Accumulator accumulator, Frame frame) throws HpackException
+ public int control(ByteBufferPool.Accumulator accumulator, Frame frame) throws HpackException
{
return generators[frame.getType().getType()].generate(accumulator, frame);
}
- public int data(RetainableByteBufferPool.Accumulator accumulator, DataFrame frame, int maxLength)
+ public int data(ByteBufferPool.Accumulator accumulator, DataFrame frame, int maxLength)
{
return dataGenerator.generate(accumulator, frame, maxLength);
}
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/GoAwayGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/GoAwayGenerator.java
index f21540a3f15..1f24a9d78b6 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/GoAwayGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/GoAwayGenerator.java
@@ -20,8 +20,8 @@ import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.frames.GoAwayFrame;
import org.eclipse.jetty.http2.internal.Flags;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class GoAwayGenerator extends FrameGenerator
@@ -32,13 +32,13 @@ public class GoAwayGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame)
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame)
{
GoAwayFrame goAwayFrame = (GoAwayFrame)frame;
return generateGoAway(accumulator, goAwayFrame.getLastStreamId(), goAwayFrame.getError(), goAwayFrame.getPayload());
}
- public int generateGoAway(RetainableByteBufferPool.Accumulator accumulator, int lastStreamId, int error, byte[] payload)
+ public int generateGoAway(ByteBufferPool.Accumulator accumulator, int lastStreamId, int error, byte[] payload)
{
if (lastStreamId < 0)
lastStreamId = 0;
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/HeaderGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/HeaderGenerator.java
index 0aebc36ed8a..d9311756ea7 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/HeaderGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/HeaderGenerator.java
@@ -17,28 +17,28 @@ import java.nio.ByteBuffer;
import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class HeaderGenerator
{
private int maxFrameSize = Frame.DEFAULT_MAX_LENGTH;
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final boolean useDirectByteBuffers;
- public HeaderGenerator(RetainableByteBufferPool bufferPool)
+ public HeaderGenerator(ByteBufferPool bufferPool)
{
this(bufferPool, true);
}
- public HeaderGenerator(RetainableByteBufferPool bufferPool, boolean useDirectByteBuffers)
+ public HeaderGenerator(ByteBufferPool bufferPool, boolean useDirectByteBuffers)
{
this.bufferPool = bufferPool;
this.useDirectByteBuffers = useDirectByteBuffers;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
@@ -50,7 +50,7 @@ public class HeaderGenerator
public RetainableByteBuffer generate(FrameType frameType, int capacity, int length, int flags, int streamId)
{
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(capacity, isUseDirectByteBuffers());
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(capacity, isUseDirectByteBuffers());
ByteBuffer header = buffer.getByteBuffer();
BufferUtil.clearToFill(header);
header.put((byte)((length & 0x00_FF_00_00) >>> 16));
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/HeadersGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/HeadersGenerator.java
index aa7bd877859..449b197080e 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/HeadersGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/HeadersGenerator.java
@@ -23,8 +23,8 @@ import org.eclipse.jetty.http2.frames.PriorityFrame;
import org.eclipse.jetty.http2.hpack.HpackEncoder;
import org.eclipse.jetty.http2.hpack.HpackException;
import org.eclipse.jetty.http2.internal.Flags;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class HeadersGenerator extends FrameGenerator
@@ -47,13 +47,13 @@ public class HeadersGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame) throws HpackException
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame) throws HpackException
{
HeadersFrame headersFrame = (HeadersFrame)frame;
return generateHeaders(accumulator, headersFrame.getStreamId(), headersFrame.getMetaData(), headersFrame.getPriority(), headersFrame.isEndStream());
}
- public int generateHeaders(RetainableByteBufferPool.Accumulator accumulator, int streamId, MetaData metaData, PriorityFrame priority, boolean endStream) throws HpackException
+ public int generateHeaders(ByteBufferPool.Accumulator accumulator, int streamId, MetaData metaData, PriorityFrame priority, boolean endStream) throws HpackException
{
if (streamId < 0)
throw new IllegalArgumentException("Invalid stream id: " + streamId);
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/NoOpGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/NoOpGenerator.java
index 0a59181c65c..7f916f6417c 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/NoOpGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/NoOpGenerator.java
@@ -14,7 +14,7 @@
package org.eclipse.jetty.http2.generator;
import org.eclipse.jetty.http2.frames.Frame;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public class NoOpGenerator extends FrameGenerator
{
@@ -24,7 +24,7 @@ public class NoOpGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame)
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame)
{
return 0;
}
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PingGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PingGenerator.java
index 5eabde84d52..d823cd1caaf 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PingGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PingGenerator.java
@@ -19,8 +19,8 @@ import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.frames.PingFrame;
import org.eclipse.jetty.http2.internal.Flags;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class PingGenerator extends FrameGenerator
@@ -31,13 +31,13 @@ public class PingGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame)
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame)
{
PingFrame pingFrame = (PingFrame)frame;
return generatePing(accumulator, pingFrame.getPayload(), pingFrame.isReply());
}
- public int generatePing(RetainableByteBufferPool.Accumulator accumulator, byte[] payload, boolean reply)
+ public int generatePing(ByteBufferPool.Accumulator accumulator, byte[] payload, boolean reply)
{
if (payload.length != PingFrame.PING_LENGTH)
throw new IllegalArgumentException("Invalid payload length: " + payload.length);
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PrefaceGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PrefaceGenerator.java
index e9d92c60c6c..2f565529416 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PrefaceGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PrefaceGenerator.java
@@ -17,8 +17,8 @@ import java.nio.ByteBuffer;
import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.PrefaceFrame;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
public class PrefaceGenerator extends FrameGenerator
{
@@ -28,7 +28,7 @@ public class PrefaceGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame)
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame)
{
accumulator.append(RetainableByteBuffer.wrap(ByteBuffer.wrap(PrefaceFrame.PREFACE_BYTES)));
return PrefaceFrame.PREFACE_BYTES.length;
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PriorityGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PriorityGenerator.java
index b72a0f39e1d..ee468e0558d 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PriorityGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PriorityGenerator.java
@@ -19,8 +19,8 @@ import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.frames.PriorityFrame;
import org.eclipse.jetty.http2.internal.Flags;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class PriorityGenerator extends FrameGenerator
@@ -31,13 +31,13 @@ public class PriorityGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame)
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame)
{
PriorityFrame priorityFrame = (PriorityFrame)frame;
return generatePriority(accumulator, priorityFrame.getStreamId(), priorityFrame.getParentStreamId(), priorityFrame.getWeight(), priorityFrame.isExclusive());
}
- public int generatePriority(RetainableByteBufferPool.Accumulator accumulator, int streamId, int parentStreamId, int weight, boolean exclusive)
+ public int generatePriority(ByteBufferPool.Accumulator accumulator, int streamId, int parentStreamId, int weight, boolean exclusive)
{
RetainableByteBuffer header = generateHeader(FrameType.PRIORITY, PriorityFrame.PRIORITY_LENGTH, Flags.NONE, streamId);
ByteBuffer byteBuffer = header.getByteBuffer();
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PushPromiseGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PushPromiseGenerator.java
index 9b2ee039453..d08c0ebdb40 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PushPromiseGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/PushPromiseGenerator.java
@@ -22,8 +22,8 @@ import org.eclipse.jetty.http2.frames.PushPromiseFrame;
import org.eclipse.jetty.http2.hpack.HpackEncoder;
import org.eclipse.jetty.http2.hpack.HpackException;
import org.eclipse.jetty.http2.internal.Flags;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class PushPromiseGenerator extends FrameGenerator
@@ -37,13 +37,13 @@ public class PushPromiseGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame) throws HpackException
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame) throws HpackException
{
PushPromiseFrame pushPromiseFrame = (PushPromiseFrame)frame;
return generatePushPromise(accumulator, pushPromiseFrame.getStreamId(), pushPromiseFrame.getPromisedStreamId(), pushPromiseFrame.getMetaData());
}
- public int generatePushPromise(RetainableByteBufferPool.Accumulator accumulator, int streamId, int promisedStreamId, MetaData metaData) throws HpackException
+ public int generatePushPromise(ByteBufferPool.Accumulator accumulator, int streamId, int promisedStreamId, MetaData metaData) throws HpackException
{
if (streamId < 0)
throw new IllegalArgumentException("Invalid stream id: " + streamId);
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/ResetGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/ResetGenerator.java
index d77a59814bc..f667f744b5a 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/ResetGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/ResetGenerator.java
@@ -19,8 +19,8 @@ import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.frames.ResetFrame;
import org.eclipse.jetty.http2.internal.Flags;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class ResetGenerator extends FrameGenerator
@@ -31,13 +31,13 @@ public class ResetGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame)
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame)
{
ResetFrame resetFrame = (ResetFrame)frame;
return generateReset(accumulator, resetFrame.getStreamId(), resetFrame.getError());
}
- public int generateReset(RetainableByteBufferPool.Accumulator accumulator, int streamId, int error)
+ public int generateReset(ByteBufferPool.Accumulator accumulator, int streamId, int error)
{
if (streamId < 0)
throw new IllegalArgumentException("Invalid stream id: " + streamId);
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/SettingsGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/SettingsGenerator.java
index 151d0a0599d..86d4313123e 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/SettingsGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/SettingsGenerator.java
@@ -20,8 +20,8 @@ import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.frames.SettingsFrame;
import org.eclipse.jetty.http2.internal.Flags;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class SettingsGenerator extends FrameGenerator
@@ -32,13 +32,13 @@ public class SettingsGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame)
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame)
{
SettingsFrame settingsFrame = (SettingsFrame)frame;
return generateSettings(accumulator, settingsFrame.getSettings(), settingsFrame.isReply());
}
- public int generateSettings(RetainableByteBufferPool.Accumulator accumulator, Map settings, boolean reply)
+ public int generateSettings(ByteBufferPool.Accumulator accumulator, Map settings, boolean reply)
{
// Two bytes for the identifier, four bytes for the value.
int entryLength = 2 + 4;
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/WindowUpdateGenerator.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/WindowUpdateGenerator.java
index 338e9723d91..8cd07a40391 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/WindowUpdateGenerator.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/generator/WindowUpdateGenerator.java
@@ -19,8 +19,8 @@ import org.eclipse.jetty.http2.frames.Frame;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.frames.WindowUpdateFrame;
import org.eclipse.jetty.http2.internal.Flags;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class WindowUpdateGenerator extends FrameGenerator
@@ -31,13 +31,13 @@ public class WindowUpdateGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, Frame frame)
+ public int generate(ByteBufferPool.Accumulator accumulator, Frame frame)
{
WindowUpdateFrame windowUpdateFrame = (WindowUpdateFrame)frame;
return generateWindowUpdate(accumulator, windowUpdateFrame.getStreamId(), windowUpdateFrame.getWindowDelta());
}
- public int generateWindowUpdate(RetainableByteBufferPool.Accumulator accumulator, int streamId, int windowUpdate)
+ public int generateWindowUpdate(ByteBufferPool.Accumulator accumulator, int streamId, int windowUpdate)
{
if (windowUpdate < 0)
throw new IllegalArgumentException("Invalid window update: " + windowUpdate);
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/internal/HTTP2Flusher.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/internal/HTTP2Flusher.java
index ea8c47721c3..fcae58a2042 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/internal/HTTP2Flusher.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/internal/HTTP2Flusher.java
@@ -30,8 +30,8 @@ import org.eclipse.jetty.http2.HTTP2Session;
import org.eclipse.jetty.http2.HTTP2Stream;
import org.eclipse.jetty.http2.frames.WindowUpdateFrame;
import org.eclipse.jetty.http2.hpack.HpackException;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EofException;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.IteratingCallback;
import org.eclipse.jetty.util.component.Dumpable;
import org.eclipse.jetty.util.thread.AutoLock;
@@ -50,7 +50,7 @@ public class HTTP2Flusher extends IteratingCallback implements Dumpable
private final Queue pendingEntries = new ArrayDeque<>();
private final Collection processedEntries = new ArrayList<>();
private final HTTP2Session session;
- private final RetainableByteBufferPool.Accumulator accumulator;
+ private final ByteBufferPool.Accumulator accumulator;
private InvocationType invocationType = InvocationType.NON_BLOCKING;
private Throwable terminated;
private HTTP2Session.Entry stalledEntry;
@@ -58,7 +58,7 @@ public class HTTP2Flusher extends IteratingCallback implements Dumpable
public HTTP2Flusher(HTTP2Session session)
{
this.session = session;
- this.accumulator = new RetainableByteBufferPool.Accumulator();
+ this.accumulator = new ByteBufferPool.Accumulator();
}
@Override
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderBlockFragments.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderBlockFragments.java
index 81540c87c30..9e8df07b9f8 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderBlockFragments.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderBlockFragments.java
@@ -16,19 +16,19 @@ package org.eclipse.jetty.http2.parser;
import java.nio.ByteBuffer;
import org.eclipse.jetty.http2.frames.PriorityFrame;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class HeaderBlockFragments
{
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private PriorityFrame priorityFrame;
private boolean endStream;
private int streamId;
private RetainableByteBuffer storage;
- public HeaderBlockFragments(RetainableByteBufferPool bufferPool)
+ public HeaderBlockFragments(ByteBufferPool bufferPool)
{
this.bufferPool = bufferPool;
}
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderBlockParser.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderBlockParser.java
index bddf48e6e8a..d06c2857ff2 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderBlockParser.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/HeaderBlockParser.java
@@ -20,8 +20,8 @@ import org.eclipse.jetty.http.MetaData;
import org.eclipse.jetty.http2.ErrorCode;
import org.eclipse.jetty.http2.hpack.HpackDecoder;
import org.eclipse.jetty.http2.hpack.HpackException;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -33,12 +33,12 @@ public class HeaderBlockParser
private static final Logger LOG = LoggerFactory.getLogger(HeaderBlockParser.class);
private final HeaderParser headerParser;
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final HpackDecoder hpackDecoder;
private final BodyParser notifier;
private RetainableByteBuffer blockBuffer;
- public HeaderBlockParser(HeaderParser headerParser, RetainableByteBufferPool bufferPool, HpackDecoder hpackDecoder, BodyParser notifier)
+ public HeaderBlockParser(HeaderParser headerParser, ByteBufferPool bufferPool, HpackDecoder hpackDecoder, BodyParser notifier)
{
this.headerParser = headerParser;
this.bufferPool = bufferPool;
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/Parser.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/Parser.java
index 33705de7a21..fb58a8bed37 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/Parser.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/Parser.java
@@ -31,7 +31,7 @@ import org.eclipse.jetty.http2.frames.SettingsFrame;
import org.eclipse.jetty.http2.frames.WindowUpdateFrame;
import org.eclipse.jetty.http2.hpack.HpackDecoder;
import org.eclipse.jetty.http2.internal.Flags;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,7 +44,7 @@ public class Parser
{
private static final Logger LOG = LoggerFactory.getLogger(Parser.class);
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final Listener listener;
private final HeaderParser headerParser;
private final HpackDecoder hpackDecoder;
@@ -55,12 +55,12 @@ public class Parser
private boolean continuation;
private State state = State.HEADER;
- public Parser(RetainableByteBufferPool bufferPool, Listener listener, int maxDynamicTableSize, int maxHeaderSize)
+ public Parser(ByteBufferPool bufferPool, Listener listener, int maxDynamicTableSize, int maxHeaderSize)
{
this(bufferPool, listener, maxDynamicTableSize, maxHeaderSize, RateControl.NO_RATE_CONTROL);
}
- public Parser(RetainableByteBufferPool bufferPool, Listener listener, int maxDynamicTableSize, int maxHeaderSize, RateControl rateControl)
+ public Parser(ByteBufferPool bufferPool, Listener listener, int maxDynamicTableSize, int maxHeaderSize, RateControl rateControl)
{
this.bufferPool = bufferPool;
this.listener = listener;
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/ServerParser.java b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/ServerParser.java
index a54eecd16c9..b58bf7b106e 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/ServerParser.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/main/java/org/eclipse/jetty/http2/parser/ServerParser.java
@@ -19,7 +19,7 @@ import org.eclipse.jetty.http2.ErrorCode;
import org.eclipse.jetty.http2.RateControl;
import org.eclipse.jetty.http2.frames.FrameType;
import org.eclipse.jetty.http2.internal.Flags;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -33,7 +33,7 @@ public class ServerParser extends Parser
private State state = State.PREFACE;
private boolean notifyPreface = true;
- public ServerParser(RetainableByteBufferPool bufferPool, Listener listener, int maxDynamicTableSize, int maxHeaderSize, RateControl rateControl)
+ public ServerParser(ByteBufferPool bufferPool, Listener listener, int maxDynamicTableSize, int maxHeaderSize, RateControl rateControl)
{
super(bufferPool, listener, maxDynamicTableSize, maxHeaderSize, rateControl);
this.listener = listener;
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/ContinuationParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/ContinuationParseTest.java
index 985a9efce40..bcec548afab 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/ContinuationParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/ContinuationParseTest.java
@@ -30,7 +30,7 @@ import org.eclipse.jetty.http2.hpack.HpackEncoder;
import org.eclipse.jetty.http2.internal.Flags;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -42,7 +42,7 @@ public class ContinuationParseTest
@Test
public void testParseOneByteAtATime() throws Exception
{
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
HeadersGenerator generator = new HeadersGenerator(new HeaderGenerator(bufferPool), new HpackEncoder());
final List frames = new ArrayList<>();
@@ -71,7 +71,7 @@ public class ContinuationParseTest
.put("User-Agent", "Jetty");
MetaData.Request metaData = new MetaData.Request("GET", HttpScheme.HTTP.asString(), new HostPortHttpField("localhost:8080"), "/path", HttpVersion.HTTP_2, fields, -1);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateHeaders(accumulator, streamId, metaData, null, true);
List byteBuffers = accumulator.getByteBuffers();
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/DataGenerateParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/DataGenerateParseTest.java
index 0f3be744655..a80fa0a5293 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/DataGenerateParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/DataGenerateParseTest.java
@@ -23,7 +23,7 @@ import org.eclipse.jetty.http2.generator.DataGenerator;
import org.eclipse.jetty.http2.generator.HeaderGenerator;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.junit.jupiter.api.Test;
@@ -34,7 +34,7 @@ public class DataGenerateParseTest
{
private final byte[] smallContent = new byte[128];
private final byte[] largeContent = new byte[128 * 1024];
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
public DataGenerateParseTest()
{
@@ -101,7 +101,7 @@ public class DataGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
ByteBuffer slice = data.slice();
int generated = 0;
while (true)
@@ -141,7 +141,7 @@ public class DataGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
ByteBuffer data = ByteBuffer.wrap(largeContent);
ByteBuffer slice = data.slice();
int generated = 0;
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/FrameFloodTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/FrameFloodTest.java
index e5b5a3d34f9..37582469cbf 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/FrameFloodTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/FrameFloodTest.java
@@ -25,7 +25,7 @@ import org.eclipse.jetty.http2.hpack.HpackEncoder;
import org.eclipse.jetty.http2.internal.Flags;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.lessThan;
public class FrameFloodTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
// Frame structure:
// | Len0 | Len1 | Len2 | Type | Flags | StreamID0 |StreamID1 |StreamID2 |StreamID3 | Payload... |
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/GoAwayGenerateParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/GoAwayGenerateParseTest.java
index 366f2a3c910..6369f5c7366 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/GoAwayGenerateParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/GoAwayGenerateParseTest.java
@@ -23,7 +23,7 @@ import org.eclipse.jetty.http2.generator.GoAwayGenerator;
import org.eclipse.jetty.http2.generator.HeaderGenerator;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
@@ -32,7 +32,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
public class GoAwayGenerateParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testGenerateParse() throws Exception
@@ -56,7 +56,7 @@ public class GoAwayGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateGoAway(accumulator, lastStreamId, error, null);
frames.clear();
@@ -100,7 +100,7 @@ public class GoAwayGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateGoAway(accumulator, lastStreamId, error, payload);
frames.clear();
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/HeadersGenerateParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/HeadersGenerateParseTest.java
index 565de253996..d76fcf3ee63 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/HeadersGenerateParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/HeadersGenerateParseTest.java
@@ -29,7 +29,7 @@ import org.eclipse.jetty.http2.generator.HeadersGenerator;
import org.eclipse.jetty.http2.hpack.HpackEncoder;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -38,7 +38,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class HeadersGenerateParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testGenerateParse() throws Exception
@@ -65,7 +65,7 @@ public class HeadersGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
PriorityFrame priorityFrame = new PriorityFrame(streamId, 3 * streamId, 200, true);
generator.generateHeaders(accumulator, streamId, metaData, priorityFrame, true);
@@ -124,7 +124,7 @@ public class HeadersGenerateParseTest
.put("User-Agent", "Jetty");
MetaData.Request metaData = new MetaData.Request("GET", HttpScheme.HTTP.asString(), new HostPortHttpField("localhost:8080"), "/path", HttpVersion.HTTP_2, fields, -1);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
PriorityFrame priorityFrame = new PriorityFrame(streamId, 3 * streamId, 200, true);
generator.generateHeaders(accumulator, streamId, metaData, priorityFrame, true);
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/HeadersTooLargeParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/HeadersTooLargeParseTest.java
index 6a43318bc6c..e06d0875df2 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/HeadersTooLargeParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/HeadersTooLargeParseTest.java
@@ -29,7 +29,7 @@ import org.eclipse.jetty.http2.hpack.HpackEncoder;
import org.eclipse.jetty.http2.hpack.HpackException;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class HeadersTooLargeParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testProtocolErrorURITooLong() throws HpackException
@@ -78,7 +78,7 @@ public class HeadersTooLargeParseTest
parser.init(UnaryOperator.identity());
int streamId = 48;
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
PriorityFrame priorityFrame = new PriorityFrame(streamId, 3 * streamId, 200, true);
int len = generator.generateHeaders(accumulator, streamId, metaData, priorityFrame, true);
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/MaxFrameSizeParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/MaxFrameSizeParseTest.java
index b73314b4625..13bb120f15f 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/MaxFrameSizeParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/MaxFrameSizeParseTest.java
@@ -20,14 +20,14 @@ import java.util.function.UnaryOperator;
import org.eclipse.jetty.http2.ErrorCode;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class MaxFrameSizeParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testMaxFrameSize()
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PingGenerateParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PingGenerateParseTest.java
index 769c3a0522e..064acd24552 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PingGenerateParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PingGenerateParseTest.java
@@ -23,7 +23,7 @@ import org.eclipse.jetty.http2.generator.HeaderGenerator;
import org.eclipse.jetty.http2.generator.PingGenerator;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.NanoTime;
import org.junit.jupiter.api.Test;
@@ -33,7 +33,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class PingGenerateParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testGenerateParse() throws Exception
@@ -57,7 +57,7 @@ public class PingGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generatePing(accumulator, payload, true);
frames.clear();
@@ -98,7 +98,7 @@ public class PingGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generatePing(accumulator, payload, true);
frames.clear();
@@ -133,7 +133,7 @@ public class PingGenerateParseTest
}, 4096, 8192);
parser.init(UnaryOperator.identity());
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
PingFrame ping = new PingFrame(NanoTime.now(), true);
generator.generate(accumulator, ping);
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PriorityGenerateParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PriorityGenerateParseTest.java
index 79b26aa74c8..f335d591f07 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PriorityGenerateParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PriorityGenerateParseTest.java
@@ -22,14 +22,14 @@ import org.eclipse.jetty.http2.generator.HeaderGenerator;
import org.eclipse.jetty.http2.generator.PriorityGenerator;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class PriorityGenerateParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testGenerateParse() throws Exception
@@ -55,7 +55,7 @@ public class PriorityGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generatePriority(accumulator, streamId, parentStreamId, weight, exclusive);
frames.clear();
@@ -100,7 +100,7 @@ public class PriorityGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generatePriority(accumulator, streamId, parentStreamId, weight, exclusive);
frames.clear();
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PushPromiseGenerateParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PushPromiseGenerateParseTest.java
index d2cbd0f5507..45adb37b139 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PushPromiseGenerateParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/PushPromiseGenerateParseTest.java
@@ -29,7 +29,7 @@ import org.eclipse.jetty.http2.generator.PushPromiseGenerator;
import org.eclipse.jetty.http2.hpack.HpackEncoder;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class PushPromiseGenerateParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testGenerateParse() throws Exception
@@ -65,7 +65,7 @@ public class PushPromiseGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generatePushPromise(accumulator, streamId, promisedStreamId, metaData);
frames.clear();
@@ -118,7 +118,7 @@ public class PushPromiseGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generatePushPromise(accumulator, streamId, promisedStreamId, metaData);
frames.clear();
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/ResetGenerateParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/ResetGenerateParseTest.java
index 4407a7597d3..15161a3709a 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/ResetGenerateParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/ResetGenerateParseTest.java
@@ -22,14 +22,14 @@ import org.eclipse.jetty.http2.generator.HeaderGenerator;
import org.eclipse.jetty.http2.generator.ResetGenerator;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class ResetGenerateParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testGenerateParse() throws Exception
@@ -53,7 +53,7 @@ public class ResetGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateReset(accumulator, streamId, error);
frames.clear();
@@ -94,7 +94,7 @@ public class ResetGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateReset(accumulator, streamId, error);
frames.clear();
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/SettingsGenerateParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/SettingsGenerateParseTest.java
index 3aee67e7e06..946c1780d60 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/SettingsGenerateParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/SettingsGenerateParseTest.java
@@ -27,7 +27,7 @@ import org.eclipse.jetty.http2.generator.HeaderGenerator;
import org.eclipse.jetty.http2.generator.SettingsGenerator;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class SettingsGenerateParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testGenerateParseNoSettings()
@@ -85,7 +85,7 @@ public class SettingsGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateSettings(accumulator, settings, true);
frames.clear();
@@ -119,7 +119,7 @@ public class SettingsGenerateParseTest
Map settings1 = new HashMap<>();
settings1.put(13, 17);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateSettings(accumulator, settings1, true);
// Modify the length of the frame to make it invalid
ByteBuffer bytes = accumulator.getByteBuffers().get(0);
@@ -160,7 +160,7 @@ public class SettingsGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateSettings(accumulator, settings1, true);
frames.clear();
@@ -205,7 +205,7 @@ public class SettingsGenerateParseTest
settings.put(i + 10, i);
}
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateSettings(accumulator, settings, false);
for (ByteBuffer buffer : accumulator.getByteBuffers())
@@ -283,7 +283,7 @@ public class SettingsGenerateParseTest
Map settings = new HashMap<>();
settings.put(13, 17);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
for (int i = 0; i < maxSettingsKeys + 1; ++i)
{
generator.generateSettings(accumulator, settings, false);
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/UnknownParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/UnknownParseTest.java
index 83cc8450205..b94e4821434 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/UnknownParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/UnknownParseTest.java
@@ -22,7 +22,7 @@ import java.util.function.UnaryOperator;
import org.eclipse.jetty.http2.ErrorCode;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -30,7 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
public class UnknownParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testParse()
diff --git a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/WindowUpdateGenerateParseTest.java b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/WindowUpdateGenerateParseTest.java
index 6f75f3cd467..369b9e03582 100644
--- a/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/WindowUpdateGenerateParseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-common/src/test/java/org/eclipse/jetty/http2/frames/WindowUpdateGenerateParseTest.java
@@ -22,14 +22,14 @@ import org.eclipse.jetty.http2.generator.HeaderGenerator;
import org.eclipse.jetty.http2.generator.WindowUpdateGenerator;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class WindowUpdateGenerateParseTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testGenerateParse() throws Exception
@@ -53,7 +53,7 @@ public class WindowUpdateGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateWindowUpdate(accumulator, streamId, windowUpdate);
frames.clear();
@@ -94,7 +94,7 @@ public class WindowUpdateGenerateParseTest
// Iterate a few times to be sure generator and parser are properly reset.
for (int i = 0; i < 2; ++i)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.generateWindowUpdate(accumulator, streamId, windowUpdate);
frames.clear();
diff --git a/jetty-core/jetty-http2/jetty-http2-server/src/main/java/org/eclipse/jetty/http2/server/AbstractHTTP2ServerConnectionFactory.java b/jetty-core/jetty-http2/jetty-http2-server/src/main/java/org/eclipse/jetty/http2/server/AbstractHTTP2ServerConnectionFactory.java
index b6e8a72b3ac..b3a2bcfcc23 100644
--- a/jetty-core/jetty-http2/jetty-http2-server/src/main/java/org/eclipse/jetty/http2/server/AbstractHTTP2ServerConnectionFactory.java
+++ b/jetty-core/jetty-http2/jetty-http2-server/src/main/java/org/eclipse/jetty/http2/server/AbstractHTTP2ServerConnectionFactory.java
@@ -37,9 +37,9 @@ import org.eclipse.jetty.http2.generator.Generator;
import org.eclipse.jetty.http2.parser.ServerParser;
import org.eclipse.jetty.http2.server.internal.HTTP2ServerConnection;
import org.eclipse.jetty.http2.server.internal.HTTP2ServerSession;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.AbstractConnectionFactory;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.HttpConfiguration;
@@ -271,7 +271,7 @@ public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConne
{
ServerSessionListener listener = newSessionListener(connector, endPoint);
- Generator generator = new Generator(connector.getRetainableByteBufferPool(), isUseOutputDirectByteBuffers(), getMaxDynamicTableSize(), getMaxHeaderBlockFragment());
+ Generator generator = new Generator(connector.getByteBufferPool(), isUseOutputDirectByteBuffers(), getMaxDynamicTableSize(), getMaxHeaderBlockFragment());
FlowControlStrategy flowControl = getFlowControlStrategyFactory().newFlowControlStrategy();
HTTP2ServerSession session = new HTTP2ServerSession(connector.getScheduler(), endPoint, generator, listener, flowControl);
session.setMaxLocalStreams(getMaxConcurrentStreams());
@@ -291,9 +291,9 @@ public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConne
parser.setMaxFrameLength(getMaxFrameLength());
parser.setMaxSettingsKeys(getMaxSettingsKeys());
- RetainableByteBufferPool retainableByteBufferPool = connector.getRetainableByteBufferPool();
+ ByteBufferPool byteBufferPool = connector.getByteBufferPool();
- HTTP2Connection connection = new HTTP2ServerConnection(retainableByteBufferPool, connector,
+ HTTP2Connection connection = new HTTP2ServerConnection(byteBufferPool, connector,
endPoint, httpConfiguration, parser, session, getInputBufferSize(), listener);
connection.setUseInputDirectByteBuffers(isUseInputDirectByteBuffers());
connection.setUseOutputDirectByteBuffers(isUseOutputDirectByteBuffers());
@@ -305,7 +305,7 @@ public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConne
private ServerParser newServerParser(Connector connector, ServerParser.Listener listener, RateControl rateControl)
{
- return new ServerParser(connector.getRetainableByteBufferPool(), listener, getMaxDynamicTableSize(), getHttpConfiguration().getRequestHeaderSize(), rateControl);
+ return new ServerParser(connector.getByteBufferPool(), listener, getMaxDynamicTableSize(), getHttpConfiguration().getRequestHeaderSize(), rateControl);
}
@ManagedObject("The container of HTTP/2 sessions")
diff --git a/jetty-core/jetty-http2/jetty-http2-server/src/main/java/org/eclipse/jetty/http2/server/internal/HTTP2ServerConnection.java b/jetty-core/jetty-http2/jetty-http2-server/src/main/java/org/eclipse/jetty/http2/server/internal/HTTP2ServerConnection.java
index 8132aa9f47a..1e22dd62bcf 100644
--- a/jetty-core/jetty-http2/jetty-http2-server/src/main/java/org/eclipse/jetty/http2/server/internal/HTTP2ServerConnection.java
+++ b/jetty-core/jetty-http2/jetty-http2-server/src/main/java/org/eclipse/jetty/http2/server/internal/HTTP2ServerConnection.java
@@ -40,9 +40,9 @@ import org.eclipse.jetty.http2.frames.PrefaceFrame;
import org.eclipse.jetty.http2.frames.SettingsFrame;
import org.eclipse.jetty.http2.parser.ServerParser;
import org.eclipse.jetty.http2.parser.SettingsBodyParser;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.ssl.SslConnection;
import org.eclipse.jetty.server.ConnectionMetaData;
import org.eclipse.jetty.server.Connector;
@@ -69,9 +69,9 @@ public class HTTP2ServerConnection extends HTTP2Connection implements Connection
private final HttpConfiguration httpConfig;
private final String id;
- public HTTP2ServerConnection(RetainableByteBufferPool retainableByteBufferPool, Connector connector, EndPoint endPoint, HttpConfiguration httpConfig, ServerParser parser, HTTP2Session session, int inputBufferSize, ServerSessionListener listener)
+ public HTTP2ServerConnection(ByteBufferPool byteBufferPool, Connector connector, EndPoint endPoint, HttpConfiguration httpConfig, ServerParser parser, HTTP2Session session, int inputBufferSize, ServerSessionListener listener)
{
- super(retainableByteBufferPool, connector.getExecutor(), endPoint, parser, session, inputBufferSize);
+ super(byteBufferPool, connector.getExecutor(), endPoint, parser, session, inputBufferSize);
this.connector = connector;
this.listener = listener;
this.httpConfig = httpConfig;
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/AbstractServerTest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/AbstractServerTest.java
index 39f6d51e9dd..9c88fceb424 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/AbstractServerTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/AbstractServerTest.java
@@ -30,7 +30,7 @@ import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
import org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.ConnectionFactory;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration;
@@ -42,7 +42,7 @@ import org.junit.jupiter.api.AfterEach;
public class AbstractServerTest
{
protected ServerConnector connector;
- protected RetainableByteBufferPool bufferPool;
+ protected ByteBufferPool bufferPool;
protected Generator generator;
protected Server server;
protected String path;
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/BadURITest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/BadURITest.java
index 6702aa7cd98..97aa202bdfb 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/BadURITest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/BadURITest.java
@@ -31,7 +31,7 @@ import org.eclipse.jetty.http2.frames.PrefaceFrame;
import org.eclipse.jetty.http2.frames.SettingsFrame;
import org.eclipse.jetty.http2.generator.Generator;
import org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.Request;
@@ -97,7 +97,7 @@ public class BadURITest
}
});
- RetainableByteBufferPool bufferPool = connector.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = connector.getByteBufferPool();
Generator generator = new Generator(bufferPool);
// Craft a request with a bad URI, it will not hit the Handler.
@@ -111,7 +111,7 @@ public class BadURITest
HttpFields.EMPTY,
-1
);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
generator.control(accumulator, new HeadersFrame(1, metaData1, null, true));
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/CloseTest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/CloseTest.java
index c6c57a38702..a1265cdc5de 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/CloseTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/CloseTest.java
@@ -37,7 +37,7 @@ import org.eclipse.jetty.http2.frames.HeadersFrame;
import org.eclipse.jetty.http2.frames.PrefaceFrame;
import org.eclipse.jetty.http2.frames.SettingsFrame;
import org.eclipse.jetty.http2.parser.Parser;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RuntimeIOException;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
@@ -74,7 +74,7 @@ public class CloseTest extends AbstractServerTest
}
});
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -135,7 +135,7 @@ public class CloseTest extends AbstractServerTest
}
});
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -202,7 +202,7 @@ public class CloseTest extends AbstractServerTest
});
connector.setIdleTimeout(idleTimeout);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/DataDemandTest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/DataDemandTest.java
index f2259b072a6..266a6a55c6f 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/DataDemandTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/DataDemandTest.java
@@ -36,7 +36,7 @@ import org.eclipse.jetty.http2.frames.DataFrame;
import org.eclipse.jetty.http2.frames.HeadersFrame;
import org.eclipse.jetty.http2.generator.Generator;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.FuturePromise;
import org.eclipse.jetty.util.Promise;
@@ -365,9 +365,9 @@ public class DataDemandTest extends AbstractTest
// Generate a lot of small DATA frames and write them in a single
// write so that the server will continuously be notified and demand,
// which will test that it won't throw StackOverflowError.
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
Generator generator = new Generator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
for (int i = 512; i >= 0; --i)
generator.data(accumulator, new DataFrame(clientStream.getId(), ByteBuffer.allocate(1), i == 0), 1);
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/FlowControlStrategyTest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/FlowControlStrategyTest.java
index b1c01fa3098..ce4237cc8f0 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/FlowControlStrategyTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/FlowControlStrategyTest.java
@@ -51,7 +51,7 @@ import org.eclipse.jetty.http2.frames.ResetFrame;
import org.eclipse.jetty.http2.frames.SettingsFrame;
import org.eclipse.jetty.http2.frames.WindowUpdateFrame;
import org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
@@ -844,7 +844,7 @@ public abstract class FlowControlStrategyTest
// Now the client is supposed to not send more frames.
// If it does, the connection must be closed.
HTTP2Session http2Session = (HTTP2Session)session;
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
ByteBuffer extraData = ByteBuffer.allocate(1024);
http2Session.getGenerator().data(accumulator, new DataFrame(stream.getId(), extraData, true), extraData.remaining());
List buffers = accumulator.getByteBuffers();
@@ -949,7 +949,7 @@ public abstract class FlowControlStrategyTest
// Now the client is supposed to not send more frames.
// If it does, the connection must be closed.
HTTP2Session http2Session = (HTTP2Session)session;
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
ByteBuffer extraData = ByteBuffer.allocate(1024);
http2Session.getGenerator().data(accumulator, new DataFrame(stream.getId(), extraData, true), extraData.remaining());
List buffers = accumulator.getByteBuffers();
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HTTP2CServerTest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HTTP2CServerTest.java
index 581d13e1379..2231af504b5 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HTTP2CServerTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HTTP2CServerTest.java
@@ -39,9 +39,9 @@ import org.eclipse.jetty.http2.frames.SettingsFrame;
import org.eclipse.jetty.http2.generator.Generator;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.ServerConnector;
@@ -196,7 +196,7 @@ public class HTTP2CServerTest extends AbstractServerTest
headersRef.set(null);
dataRef.set(null);
latchRef.set(new CountDownLatch(2));
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = new MetaData.Request("GET", HttpScheme.HTTP.asString(), new HostPortHttpField("localhost:" + connector.getLocalPort()), "/two", HttpVersion.HTTP_2, HttpFields.EMPTY, -1);
@@ -234,7 +234,7 @@ public class HTTP2CServerTest extends AbstractServerTest
bufferPool = new ArrayRetainableByteBufferPool();
generator = new Generator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = new MetaData.Request("GET", HttpScheme.HTTP.asString(), new HostPortHttpField("localhost:" + connector.getLocalPort()), "/test", HttpVersion.HTTP_2, HttpFields.EMPTY, -1);
@@ -331,7 +331,7 @@ public class HTTP2CServerTest extends AbstractServerTest
bufferPool = new ArrayRetainableByteBufferPool();
generator = new Generator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
try (Socket client = new Socket("localhost", connector.getLocalPort()))
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HTTP2ServerTest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HTTP2ServerTest.java
index cfda77eb906..e5b3feea8ef 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HTTP2ServerTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HTTP2ServerTest.java
@@ -47,9 +47,9 @@ import org.eclipse.jetty.http2.generator.Generator;
import org.eclipse.jetty.http2.internal.Flags;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ManagedSelector;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.SocketChannelEndPoint;
import org.eclipse.jetty.logging.StacklessLogging;
import org.eclipse.jetty.server.Handler;
@@ -85,7 +85,7 @@ public class HTTP2ServerTest extends AbstractServerTest
// No preface bytes.
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new HeadersFrame(1, metaData, null, true));
try (Socket client = new Socket("localhost", connector.getLocalPort()))
@@ -128,7 +128,7 @@ public class HTTP2ServerTest extends AbstractServerTest
}
});
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -187,7 +187,7 @@ public class HTTP2ServerTest extends AbstractServerTest
}
});
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -255,7 +255,7 @@ public class HTTP2ServerTest extends AbstractServerTest
}
});
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
generator.control(accumulator, new PingFrame(new byte[8], false));
@@ -301,7 +301,7 @@ public class HTTP2ServerTest extends AbstractServerTest
}
});
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
generator.control(accumulator, new PingFrame(new byte[8], false));
@@ -374,7 +374,7 @@ public class HTTP2ServerTest extends AbstractServerTest
server.addConnector(connector2);
server.start();
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -414,7 +414,7 @@ public class HTTP2ServerTest extends AbstractServerTest
}
});
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -443,7 +443,7 @@ public class HTTP2ServerTest extends AbstractServerTest
{
testRequestWithContinuationFrames(null, () ->
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -458,7 +458,7 @@ public class HTTP2ServerTest extends AbstractServerTest
PriorityFrame priority = new PriorityFrame(1, 13, 200, true);
testRequestWithContinuationFrames(priority, () ->
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -472,7 +472,7 @@ public class HTTP2ServerTest extends AbstractServerTest
{
testRequestWithContinuationFrames(null, () ->
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -494,7 +494,7 @@ public class HTTP2ServerTest extends AbstractServerTest
PriorityFrame priority = new PriorityFrame(1, 13, 200, true);
testRequestWithContinuationFrames(null, () ->
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -515,7 +515,7 @@ public class HTTP2ServerTest extends AbstractServerTest
{
testRequestWithContinuationFrames(null, () ->
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -539,7 +539,7 @@ public class HTTP2ServerTest extends AbstractServerTest
{
testRequestWithContinuationFrames(null, () ->
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
generator.control(accumulator, new SettingsFrame(new HashMap<>(), false));
MetaData.Request metaData = newRequest("GET", HttpFields.EMPTY);
@@ -560,7 +560,7 @@ public class HTTP2ServerTest extends AbstractServerTest
});
}
- private void testRequestWithContinuationFrames(PriorityFrame priorityFrame, Callable frames) throws Exception
+ private void testRequestWithContinuationFrames(PriorityFrame priorityFrame, Callable frames) throws Exception
{
CountDownLatch serverLatch = new CountDownLatch(1);
startServer(new ServerSessionListener()
@@ -588,7 +588,7 @@ public class HTTP2ServerTest extends AbstractServerTest
});
generator = new Generator(bufferPool, 4096, 4);
- RetainableByteBufferPool.Accumulator accumulator = frames.call();
+ ByteBufferPool.Accumulator accumulator = frames.call();
try (Socket client = new Socket("localhost", connector.getLocalPort()))
{
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HttpClientTransportOverHTTP2Test.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HttpClientTransportOverHTTP2Test.java
index 6c58c955e5f..7b74885fd87 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HttpClientTransportOverHTTP2Test.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/HttpClientTransportOverHTTP2Test.java
@@ -68,9 +68,9 @@ import org.eclipse.jetty.http2.hpack.HpackException;
import org.eclipse.jetty.http2.parser.ServerParser;
import org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.Request;
@@ -111,7 +111,7 @@ public class HttpClientTransportOverHTTP2Test extends AbstractTest
assertTrue(http2Client.isStarted());
assertSame(httpClient.getExecutor(), http2Client.getExecutor());
assertSame(httpClient.getScheduler(), http2Client.getScheduler());
- assertSame(httpClient.getRetainableByteBufferPool(), http2Client.getRetainableByteBufferPool());
+ assertSame(httpClient.getByteBufferPool(), http2Client.getByteBufferPool());
assertEquals(httpClient.getConnectTimeout(), http2Client.getConnectTimeout());
assertEquals(httpClient.getIdleTimeout(), http2Client.getIdleTimeout());
assertEquals(httpClient.isUseInputDirectByteBuffers(), http2Client.isUseInputDirectByteBuffers());
@@ -541,8 +541,8 @@ public class HttpClientTransportOverHTTP2Test extends AbstractTest
resultLatch.countDown();
});
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
Generator generator = new Generator(bufferPool);
try (Socket socket = server.accept())
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/PrefaceTest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/PrefaceTest.java
index 5055cefc8ea..dbdd3c54b25 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/PrefaceTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/PrefaceTest.java
@@ -51,8 +51,8 @@ import org.eclipse.jetty.http2.generator.Generator;
import org.eclipse.jetty.http2.parser.Parser;
import org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
@@ -148,13 +148,13 @@ public class PrefaceTest extends AbstractTest
}
});
- RetainableByteBufferPool bufferPool = http2Client.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = http2Client.getByteBufferPool();
try (SocketChannel socket = SocketChannel.open())
{
socket.connect(new InetSocketAddress("localhost", connector.getLocalPort()));
Generator generator = new Generator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
Map clientSettings = new HashMap<>();
clientSettings.put(SettingsFrame.ENABLE_PUSH, 0);
@@ -247,7 +247,7 @@ public class PrefaceTest extends AbstractTest
});
server.start();
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
try (SocketChannel socket = SocketChannel.open())
{
socket.connect(new InetSocketAddress("localhost", connector.getLocalPort()));
@@ -296,7 +296,7 @@ public class PrefaceTest extends AbstractTest
// After the 101, the client must send the connection preface.
Generator generator = new Generator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
Map clientSettings = new HashMap<>();
clientSettings.put(SettingsFrame.ENABLE_PUSH, 1);
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/StreamCountTest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/StreamCountTest.java
index b83245ae0ad..9eb667f06d7 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/StreamCountTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/StreamCountTest.java
@@ -33,7 +33,7 @@ import org.eclipse.jetty.http2.frames.HeadersFrame;
import org.eclipse.jetty.http2.frames.ResetFrame;
import org.eclipse.jetty.http2.frames.SettingsFrame;
import org.eclipse.jetty.http2.generator.Generator;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.FuturePromise;
@@ -201,7 +201,7 @@ public class StreamCountTest extends AbstractTest
HeadersFrame frame3 = new HeadersFrame(streamId3, metaData, null, false);
DataFrame data3 = new DataFrame(streamId3, BufferUtil.EMPTY_BUFFER, true);
Generator generator = ((HTTP2Session)session).getGenerator();
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, frame3);
generator.data(accumulator, data3, data3.remaining());
((HTTP2Session)session).getEndPoint().write(Callback.NOOP, accumulator.getByteBuffers().toArray(ByteBuffer[]::new));
diff --git a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/StreamResetTest.java b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/StreamResetTest.java
index 7db1178f8af..3b1dffbcd04 100644
--- a/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/StreamResetTest.java
+++ b/jetty-core/jetty-http2/jetty-http2-tests/src/test/java/org/eclipse/jetty/http2/tests/StreamResetTest.java
@@ -64,8 +64,8 @@ import org.eclipse.jetty.http2.internal.HTTP2Flusher;
import org.eclipse.jetty.http2.server.AbstractHTTP2ServerConnectionFactory;
import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
import org.eclipse.jetty.io.AbstractEndPoint;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.WriteFlusher;
import org.eclipse.jetty.logging.StacklessLogging;
import org.eclipse.jetty.server.Handler;
@@ -887,7 +887,7 @@ public class StreamResetTest extends AbstractTest
}
});
- RetainableByteBufferPool bufferPool = http2Client.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = http2Client.getByteBufferPool();
try (SocketChannel socket = SocketChannel.open())
{
String host = "localhost";
@@ -895,7 +895,7 @@ public class StreamResetTest extends AbstractTest
socket.connect(new InetSocketAddress(host, port));
Generator generator = new Generator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
Map clientSettings = new HashMap<>();
// Max stream HTTP/2 flow control window.
@@ -978,7 +978,7 @@ public class StreamResetTest extends AbstractTest
}
});
- RetainableByteBufferPool bufferPool = http2Client.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = http2Client.getByteBufferPool();
try (SocketChannel socket = SocketChannel.open())
{
String host = "localhost";
@@ -986,7 +986,7 @@ public class StreamResetTest extends AbstractTest
socket.connect(new InetSocketAddress(host, port));
Generator generator = new Generator(bufferPool);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
generator.control(accumulator, new PrefaceFrame());
Map clientSettings = new HashMap<>();
// Max stream HTTP/2 flow control window.
diff --git a/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/HttpClientTransportOverHTTP3.java b/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/HttpClientTransportOverHTTP3.java
index b9586f049eb..36301a9a6b8 100644
--- a/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/HttpClientTransportOverHTTP3.java
+++ b/jetty-core/jetty-http3/jetty-http3-client-transport/src/main/java/org/eclipse/jetty/http3/client/transport/HttpClientTransportOverHTTP3.java
@@ -69,7 +69,7 @@ public class HttpClientTransportOverHTTP3 extends AbstractHttpClientTransport im
ClientConnector clientConnector = this.client.getClientConnector();
clientConnector.setExecutor(httpClient.getExecutor());
clientConnector.setScheduler(httpClient.getScheduler());
- clientConnector.setRetainableByteBufferPool(httpClient.getRetainableByteBufferPool());
+ clientConnector.setByteBufferPool(httpClient.getByteBufferPool());
clientConnector.setConnectTimeout(Duration.ofMillis(httpClient.getConnectTimeout()));
clientConnector.setConnectBlocking(httpClient.isConnectBlocking());
clientConnector.setBindAddress(httpClient.getBindAddress());
diff --git a/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/ClientHTTP3Session.java b/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/ClientHTTP3Session.java
index 382afa5286b..dcf4cbabbda 100644
--- a/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/ClientHTTP3Session.java
+++ b/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/ClientHTTP3Session.java
@@ -30,7 +30,7 @@ import org.eclipse.jetty.http3.frames.Frame;
import org.eclipse.jetty.http3.frames.SettingsFrame;
import org.eclipse.jetty.http3.qpack.QpackDecoder;
import org.eclipse.jetty.http3.qpack.QpackEncoder;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.quic.client.ClientProtocolSession;
import org.eclipse.jetty.quic.client.ClientQuicSession;
import org.eclipse.jetty.quic.common.QuicStreamEndPoint;
@@ -64,7 +64,7 @@ public class ClientHTTP3Session extends ClientProtocolSession
long encoderStreamId = getQuicSession().newStreamId(StreamType.CLIENT_UNIDIRECTIONAL);
QuicStreamEndPoint encoderEndPoint = openInstructionEndPoint(encoderStreamId);
InstructionFlusher encoderInstructionFlusher = new InstructionFlusher(quicSession, encoderEndPoint, EncoderStreamConnection.STREAM_TYPE);
- RetainableByteBufferPool bufferPool = quicSession.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = quicSession.getByteBufferPool();
this.encoder = new QpackEncoder(bufferPool, new InstructionHandler(encoderInstructionFlusher), configuration.getMaxBlockedStreams());
addBean(encoder);
if (LOG.isDebugEnabled())
@@ -85,7 +85,7 @@ public class ClientHTTP3Session extends ClientProtocolSession
if (LOG.isDebugEnabled())
LOG.debug("created control stream #{} on {}", controlStreamId, controlEndPoint);
- this.messageFlusher = new MessageFlusher(quicSession.getRetainableByteBufferPool(), encoder, configuration.getMaxRequestHeadersSize(), configuration.isUseOutputDirectByteBuffers());
+ this.messageFlusher = new MessageFlusher(quicSession.getByteBufferPool(), encoder, configuration.getMaxRequestHeadersSize(), configuration.isUseOutputDirectByteBuffers());
addBean(messageFlusher);
}
@@ -199,7 +199,7 @@ public class ClientHTTP3Session extends ClientProtocolSession
private void openUnidirectionalStreamEndPoint(QuicStreamEndPoint endPoint)
{
- UnidirectionalStreamConnection connection = new UnidirectionalStreamConnection(endPoint, getQuicSession().getExecutor(), getQuicSession().getRetainableByteBufferPool(), encoder, decoder, session);
+ UnidirectionalStreamConnection connection = new UnidirectionalStreamConnection(endPoint, getQuicSession().getExecutor(), getQuicSession().getByteBufferPool(), encoder, decoder, session);
endPoint.setConnection(connection);
endPoint.opened();
}
diff --git a/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/internal/ClientHTTP3StreamConnection.java b/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/internal/ClientHTTP3StreamConnection.java
index 709a18f034f..bd51ba5abc8 100644
--- a/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/internal/ClientHTTP3StreamConnection.java
+++ b/jetty-core/jetty-http3/jetty-http3-client/src/main/java/org/eclipse/jetty/http3/client/internal/ClientHTTP3StreamConnection.java
@@ -22,6 +22,6 @@ public class ClientHTTP3StreamConnection extends HTTP3StreamConnection
{
public ClientHTTP3StreamConnection(QuicStreamEndPoint endPoint, ClientHTTP3Session session, MessageParser parser)
{
- super(endPoint, session.getQuicSession().getExecutor(), session.getQuicSession().getRetainableByteBufferPool(), parser);
+ super(endPoint, session.getQuicSession().getExecutor(), session.getQuicSession().getByteBufferPool(), parser);
}
}
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/ControlFlusher.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/ControlFlusher.java
index 793d0b861bd..2ce9fac5388 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/ControlFlusher.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/ControlFlusher.java
@@ -23,8 +23,8 @@ import org.eclipse.jetty.http3.frames.Frame;
import org.eclipse.jetty.http3.generator.ControlGenerator;
import org.eclipse.jetty.http3.internal.ControlStreamConnection;
import org.eclipse.jetty.http3.internal.VarLenInt;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.quic.common.QuicSession;
import org.eclipse.jetty.quic.common.QuicStreamEndPoint;
import org.eclipse.jetty.util.Callback;
@@ -42,7 +42,7 @@ public class ControlFlusher extends IteratingCallback
private final Queue queue = new ArrayDeque<>();
private final QuicStreamEndPoint endPoint;
private final ControlGenerator generator;
- private final RetainableByteBufferPool.Accumulator accumulator;
+ private final ByteBufferPool.Accumulator accumulator;
private boolean initialized;
private Throwable terminated;
private List entries;
@@ -51,9 +51,9 @@ public class ControlFlusher extends IteratingCallback
public ControlFlusher(QuicSession session, QuicStreamEndPoint endPoint, boolean useDirectByteBuffers)
{
this.endPoint = endPoint;
- RetainableByteBufferPool bufferPool = session.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = session.getByteBufferPool();
this.generator = new ControlGenerator(bufferPool, useDirectByteBuffers);
- this.accumulator = new RetainableByteBufferPool.Accumulator();
+ this.accumulator = new ByteBufferPool.Accumulator();
}
public boolean offer(Frame frame, Callback callback)
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/DecoderStreamConnection.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/DecoderStreamConnection.java
index 81085a09de7..e2241cd339d 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/DecoderStreamConnection.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/DecoderStreamConnection.java
@@ -18,8 +18,8 @@ import java.util.concurrent.Executor;
import org.eclipse.jetty.http3.qpack.QpackEncoder;
import org.eclipse.jetty.http3.qpack.QpackException;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
public class DecoderStreamConnection extends InstructionStreamConnection
{
@@ -28,7 +28,7 @@ public class DecoderStreamConnection extends InstructionStreamConnection
private final QpackEncoder encoder;
- public DecoderStreamConnection(EndPoint endPoint, Executor executor, RetainableByteBufferPool bufferPool, QpackEncoder encoder)
+ public DecoderStreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, QpackEncoder encoder)
{
super(endPoint, executor, bufferPool);
this.encoder = encoder;
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/EncoderStreamConnection.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/EncoderStreamConnection.java
index 990c8cab352..3c87986972d 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/EncoderStreamConnection.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/EncoderStreamConnection.java
@@ -18,8 +18,8 @@ import java.util.concurrent.Executor;
import org.eclipse.jetty.http3.qpack.QpackDecoder;
import org.eclipse.jetty.http3.qpack.QpackException;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
public class EncoderStreamConnection extends InstructionStreamConnection
{
@@ -28,7 +28,7 @@ public class EncoderStreamConnection extends InstructionStreamConnection
private final QpackDecoder decoder;
- public EncoderStreamConnection(EndPoint endPoint, Executor executor, RetainableByteBufferPool bufferPool, QpackDecoder decoder)
+ public EncoderStreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, QpackDecoder decoder)
{
super(endPoint, executor, bufferPool);
this.decoder = decoder;
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/HTTP3StreamConnection.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/HTTP3StreamConnection.java
index 81ab895bc79..39e9581a3a8 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/HTTP3StreamConnection.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/HTTP3StreamConnection.java
@@ -27,8 +27,8 @@ import org.eclipse.jetty.http3.frames.HeadersFrame;
import org.eclipse.jetty.http3.parser.MessageParser;
import org.eclipse.jetty.http3.parser.ParserListener;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.quic.common.QuicStreamEndPoint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -40,7 +40,7 @@ public abstract class HTTP3StreamConnection extends AbstractConnection
private static final ByteBuffer EMPTY_DATA_FRAME = ByteBuffer.allocate(2);
private final AtomicReference action = new AtomicReference<>();
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final MessageParser parser;
private boolean useInputDirectByteBuffers = true;
private HTTP3Stream stream;
@@ -48,7 +48,7 @@ public abstract class HTTP3StreamConnection extends AbstractConnection
private boolean applicationMode;
private boolean remotelyClosed;
- public HTTP3StreamConnection(QuicStreamEndPoint endPoint, Executor executor, RetainableByteBufferPool bufferPool, MessageParser parser)
+ public HTTP3StreamConnection(QuicStreamEndPoint endPoint, Executor executor, ByteBufferPool bufferPool, MessageParser parser)
{
super(endPoint, executor);
this.bufferPool = bufferPool;
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/InstructionFlusher.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/InstructionFlusher.java
index 7585471aa53..3e79d130957 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/InstructionFlusher.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/InstructionFlusher.java
@@ -21,8 +21,8 @@ import java.util.Queue;
import org.eclipse.jetty.http3.internal.VarLenInt;
import org.eclipse.jetty.http3.qpack.Instruction;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.quic.common.QuicSession;
import org.eclipse.jetty.quic.common.QuicStreamEndPoint;
import org.eclipse.jetty.util.BufferUtil;
@@ -41,8 +41,8 @@ public class InstructionFlusher extends IteratingCallback
private final AutoLock lock = new AutoLock();
private final Queue queue = new ArrayDeque<>();
- private final RetainableByteBufferPool bufferPool;
- private final RetainableByteBufferPool.Accumulator accumulator;
+ private final ByteBufferPool bufferPool;
+ private final ByteBufferPool.Accumulator accumulator;
private final QuicStreamEndPoint endPoint;
private final long streamType;
private boolean initialized;
@@ -50,8 +50,8 @@ public class InstructionFlusher extends IteratingCallback
public InstructionFlusher(QuicSession session, QuicStreamEndPoint endPoint, long streamType)
{
- this.bufferPool = session.getRetainableByteBufferPool();
- this.accumulator = new RetainableByteBufferPool.Accumulator();
+ this.bufferPool = session.getByteBufferPool();
+ this.accumulator = new ByteBufferPool.Accumulator();
this.endPoint = endPoint;
this.streamType = streamType;
}
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/InstructionStreamConnection.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/InstructionStreamConnection.java
index 2af6820f8cb..a8af09ebe1c 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/InstructionStreamConnection.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/InstructionStreamConnection.java
@@ -18,10 +18,10 @@ import java.util.concurrent.Executor;
import org.eclipse.jetty.http3.qpack.QpackException;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -29,11 +29,11 @@ import org.slf4j.LoggerFactory;
public abstract class InstructionStreamConnection extends AbstractConnection implements Connection.UpgradeTo
{
private static final Logger LOG = LoggerFactory.getLogger(InstructionStreamConnection.class);
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private boolean useInputDirectByteBuffers = true;
private RetainableByteBuffer buffer;
- public InstructionStreamConnection(EndPoint endPoint, Executor executor, RetainableByteBufferPool bufferPool)
+ public InstructionStreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool)
{
super(endPoint, executor);
this.bufferPool = bufferPool;
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/MessageFlusher.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/MessageFlusher.java
index 3e75135088a..955b424be56 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/MessageFlusher.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/MessageFlusher.java
@@ -21,7 +21,7 @@ import java.util.Queue;
import org.eclipse.jetty.http3.frames.Frame;
import org.eclipse.jetty.http3.generator.MessageGenerator;
import org.eclipse.jetty.http3.qpack.QpackEncoder;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.quic.common.QuicStreamEndPoint;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.IteratingCallback;
@@ -35,13 +35,13 @@ public class MessageFlusher extends IteratingCallback
private final AutoLock lock = new AutoLock();
private final Queue entries = new ArrayDeque<>();
- private final RetainableByteBufferPool.Accumulator accumulator;
+ private final ByteBufferPool.Accumulator accumulator;
private final MessageGenerator generator;
private Entry entry;
- public MessageFlusher(RetainableByteBufferPool bufferPool, QpackEncoder encoder, int maxHeadersLength, boolean useDirectByteBuffers)
+ public MessageFlusher(ByteBufferPool bufferPool, QpackEncoder encoder, int maxHeadersLength, boolean useDirectByteBuffers)
{
- this.accumulator = new RetainableByteBufferPool.Accumulator();
+ this.accumulator = new ByteBufferPool.Accumulator();
this.generator = new MessageGenerator(bufferPool, encoder, maxHeadersLength, useDirectByteBuffers);
}
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/UnidirectionalStreamConnection.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/UnidirectionalStreamConnection.java
index bc4451a4176..32e548f2dc6 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/UnidirectionalStreamConnection.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/UnidirectionalStreamConnection.java
@@ -23,9 +23,9 @@ import org.eclipse.jetty.http3.parser.ParserListener;
import org.eclipse.jetty.http3.qpack.QpackDecoder;
import org.eclipse.jetty.http3.qpack.QpackEncoder;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.quic.common.QuicStreamEndPoint;
import org.eclipse.jetty.quic.common.StreamType;
import org.slf4j.Logger;
@@ -35,7 +35,7 @@ public class UnidirectionalStreamConnection extends AbstractConnection implement
{
private static final Logger LOG = LoggerFactory.getLogger(UnidirectionalStreamConnection.class);
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final QpackEncoder encoder;
private final QpackDecoder decoder;
private final ParserListener listener;
@@ -43,7 +43,7 @@ public class UnidirectionalStreamConnection extends AbstractConnection implement
private boolean useInputDirectByteBuffers = true;
private RetainableByteBuffer buffer;
- public UnidirectionalStreamConnection(QuicStreamEndPoint endPoint, Executor executor, RetainableByteBufferPool bufferPool, QpackEncoder encoder, QpackDecoder decoder, ParserListener listener)
+ public UnidirectionalStreamConnection(QuicStreamEndPoint endPoint, Executor executor, ByteBufferPool bufferPool, QpackEncoder encoder, QpackDecoder decoder, ParserListener listener)
{
super(endPoint, executor);
this.bufferPool = bufferPool;
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/CancelPushGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/CancelPushGenerator.java
index 55237a1fbce..d23f2732ab7 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/CancelPushGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/CancelPushGenerator.java
@@ -16,17 +16,17 @@ package org.eclipse.jetty.http3.generator;
import java.util.function.Consumer;
import org.eclipse.jetty.http3.frames.Frame;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public class CancelPushGenerator extends FrameGenerator
{
- public CancelPushGenerator(RetainableByteBufferPool bufferPool)
+ public CancelPushGenerator(ByteBufferPool bufferPool)
{
super(bufferPool);
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
+ public int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
{
return 0;
}
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/ControlGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/ControlGenerator.java
index ec9abad6b26..3a0dc0be385 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/ControlGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/ControlGenerator.java
@@ -17,13 +17,13 @@ import java.util.function.Consumer;
import org.eclipse.jetty.http3.frames.Frame;
import org.eclipse.jetty.http3.frames.FrameType;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public class ControlGenerator
{
private final FrameGenerator[] generators = new FrameGenerator[FrameType.maxType() + 1];
- public ControlGenerator(RetainableByteBufferPool bufferPool, boolean useDirectByteBuffers)
+ public ControlGenerator(ByteBufferPool bufferPool, boolean useDirectByteBuffers)
{
generators[FrameType.CANCEL_PUSH.type()] = new CancelPushGenerator(bufferPool);
generators[FrameType.SETTINGS.type()] = new SettingsGenerator(bufferPool, useDirectByteBuffers);
@@ -31,7 +31,7 @@ public class ControlGenerator
generators[FrameType.MAX_PUSH_ID.type()] = new MaxPushIdGenerator(bufferPool);
}
- public int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
+ public int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
{
return generators[frame.getFrameType().type()].generate(accumulator, streamId, frame, fail);
}
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/DataGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/DataGenerator.java
index 05a808f353a..48ba615be26 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/DataGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/DataGenerator.java
@@ -20,33 +20,33 @@ import org.eclipse.jetty.http3.frames.DataFrame;
import org.eclipse.jetty.http3.frames.Frame;
import org.eclipse.jetty.http3.frames.FrameType;
import org.eclipse.jetty.http3.internal.VarLenInt;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class DataGenerator extends FrameGenerator
{
private final boolean useDirectByteBuffers;
- public DataGenerator(RetainableByteBufferPool bufferPool, boolean useDirectByteBuffers)
+ public DataGenerator(ByteBufferPool bufferPool, boolean useDirectByteBuffers)
{
super(bufferPool);
this.useDirectByteBuffers = useDirectByteBuffers;
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
+ public int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
{
DataFrame dataFrame = (DataFrame)frame;
return generateDataFrame(accumulator, dataFrame);
}
- private int generateDataFrame(RetainableByteBufferPool.Accumulator accumulator, DataFrame frame)
+ private int generateDataFrame(ByteBufferPool.Accumulator accumulator, DataFrame frame)
{
ByteBuffer data = frame.getByteBuffer();
int dataLength = data.remaining();
int headerLength = VarLenInt.length(FrameType.DATA.type()) + VarLenInt.length(dataLength);
- RetainableByteBuffer header = getRetainableByteBufferPool().acquire(headerLength, useDirectByteBuffers);
+ RetainableByteBuffer header = getByteBufferPool().acquire(headerLength, useDirectByteBuffers);
ByteBuffer byteBuffer = header.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
VarLenInt.encode(byteBuffer, FrameType.DATA.type());
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/FrameGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/FrameGenerator.java
index 9154b60bf54..81413153cd5 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/FrameGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/FrameGenerator.java
@@ -16,21 +16,21 @@ package org.eclipse.jetty.http3.generator;
import java.util.function.Consumer;
import org.eclipse.jetty.http3.frames.Frame;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public abstract class FrameGenerator
{
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
- public FrameGenerator(RetainableByteBufferPool bufferPool)
+ public FrameGenerator(ByteBufferPool bufferPool)
{
this.bufferPool = bufferPool;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
- public abstract int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail);
+ public abstract int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail);
}
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/GoAwayGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/GoAwayGenerator.java
index 90c1ba551df..7c4b3b123c7 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/GoAwayGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/GoAwayGenerator.java
@@ -20,33 +20,33 @@ import org.eclipse.jetty.http3.frames.Frame;
import org.eclipse.jetty.http3.frames.FrameType;
import org.eclipse.jetty.http3.frames.GoAwayFrame;
import org.eclipse.jetty.http3.internal.VarLenInt;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class GoAwayGenerator extends FrameGenerator
{
private final boolean useDirectByteBuffers;
- public GoAwayGenerator(RetainableByteBufferPool bufferPool, boolean useDirectByteBuffers)
+ public GoAwayGenerator(ByteBufferPool bufferPool, boolean useDirectByteBuffers)
{
super(bufferPool);
this.useDirectByteBuffers = useDirectByteBuffers;
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
+ public int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
{
GoAwayFrame goAwayFrame = (GoAwayFrame)frame;
return generateGoAwayFrame(accumulator, goAwayFrame);
}
- private int generateGoAwayFrame(RetainableByteBufferPool.Accumulator accumulator, GoAwayFrame frame)
+ private int generateGoAwayFrame(ByteBufferPool.Accumulator accumulator, GoAwayFrame frame)
{
long lastId = frame.getLastId();
int lastIdLength = VarLenInt.length(lastId);
int length = VarLenInt.length(FrameType.GOAWAY.type()) + VarLenInt.length(lastIdLength) + lastIdLength;
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(length, useDirectByteBuffers);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(length, useDirectByteBuffers);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
VarLenInt.encode(byteBuffer, FrameType.GOAWAY.type());
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/HeadersGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/HeadersGenerator.java
index 3b6a4436fef..25e76885365 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/HeadersGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/HeadersGenerator.java
@@ -22,8 +22,8 @@ import org.eclipse.jetty.http3.frames.HeadersFrame;
import org.eclipse.jetty.http3.internal.VarLenInt;
import org.eclipse.jetty.http3.qpack.QpackEncoder;
import org.eclipse.jetty.http3.qpack.QpackException;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class HeadersGenerator extends FrameGenerator
@@ -32,7 +32,7 @@ public class HeadersGenerator extends FrameGenerator
private final int maxLength;
private final boolean useDirectByteBuffers;
- public HeadersGenerator(RetainableByteBufferPool bufferPool, QpackEncoder encoder, int maxLength, boolean useDirectByteBuffers)
+ public HeadersGenerator(ByteBufferPool bufferPool, QpackEncoder encoder, int maxLength, boolean useDirectByteBuffers)
{
super(bufferPool);
this.encoder = encoder;
@@ -41,13 +41,13 @@ public class HeadersGenerator extends FrameGenerator
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
+ public int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
{
HeadersFrame headersFrame = (HeadersFrame)frame;
return generateHeadersFrame(accumulator, streamId, headersFrame, fail);
}
- private int generateHeadersFrame(RetainableByteBufferPool.Accumulator accumulator, long streamId, HeadersFrame frame, Consumer fail)
+ private int generateHeadersFrame(ByteBufferPool.Accumulator accumulator, long streamId, HeadersFrame frame, Consumer fail)
{
try
{
@@ -55,7 +55,7 @@ public class HeadersGenerator extends FrameGenerator
int frameTypeLength = VarLenInt.length(FrameType.HEADERS.type());
int maxHeaderLength = frameTypeLength + VarLenInt.MAX_LENGTH;
// The capacity of the buffer is larger than maxLength, but we need to enforce at most maxLength.
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(maxHeaderLength + maxLength, useDirectByteBuffers);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(maxHeaderLength + maxLength, useDirectByteBuffers);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
byteBuffer.position(maxHeaderLength);
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/MaxPushIdGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/MaxPushIdGenerator.java
index bf2cc54d055..8ce7f81e122 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/MaxPushIdGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/MaxPushIdGenerator.java
@@ -16,17 +16,17 @@ package org.eclipse.jetty.http3.generator;
import java.util.function.Consumer;
import org.eclipse.jetty.http3.frames.Frame;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public class MaxPushIdGenerator extends FrameGenerator
{
- public MaxPushIdGenerator(RetainableByteBufferPool bufferPool)
+ public MaxPushIdGenerator(ByteBufferPool bufferPool)
{
super(bufferPool);
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
+ public int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
{
return 0;
}
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/MessageGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/MessageGenerator.java
index a5f5744907f..182fa1c4a7d 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/MessageGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/MessageGenerator.java
@@ -18,20 +18,20 @@ import java.util.function.Consumer;
import org.eclipse.jetty.http3.frames.Frame;
import org.eclipse.jetty.http3.frames.FrameType;
import org.eclipse.jetty.http3.qpack.QpackEncoder;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public class MessageGenerator
{
private final FrameGenerator[] generators = new FrameGenerator[FrameType.maxType() + 1];
- public MessageGenerator(RetainableByteBufferPool bufferPool, QpackEncoder encoder, int maxHeadersLength, boolean useDirectByteBuffers)
+ public MessageGenerator(ByteBufferPool bufferPool, QpackEncoder encoder, int maxHeadersLength, boolean useDirectByteBuffers)
{
generators[FrameType.DATA.type()] = new DataGenerator(bufferPool, useDirectByteBuffers);
generators[FrameType.HEADERS.type()] = new HeadersGenerator(bufferPool, encoder, maxHeadersLength, useDirectByteBuffers);
generators[FrameType.PUSH_PROMISE.type()] = new PushPromiseGenerator(bufferPool);
}
- public int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
+ public int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
{
return generators[frame.getFrameType().type()].generate(accumulator, streamId, frame, fail);
}
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/PushPromiseGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/PushPromiseGenerator.java
index ebf95c3cdf6..39698085362 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/PushPromiseGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/PushPromiseGenerator.java
@@ -16,17 +16,17 @@ package org.eclipse.jetty.http3.generator;
import java.util.function.Consumer;
import org.eclipse.jetty.http3.frames.Frame;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public class PushPromiseGenerator extends FrameGenerator
{
- public PushPromiseGenerator(RetainableByteBufferPool bufferPool)
+ public PushPromiseGenerator(ByteBufferPool bufferPool)
{
super(bufferPool);
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
+ public int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
{
return 0;
}
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/SettingsGenerator.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/SettingsGenerator.java
index 4caf1537bad..57369aace7c 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/SettingsGenerator.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/generator/SettingsGenerator.java
@@ -20,28 +20,28 @@ import java.util.function.Consumer;
import org.eclipse.jetty.http3.frames.Frame;
import org.eclipse.jetty.http3.frames.SettingsFrame;
import org.eclipse.jetty.http3.internal.VarLenInt;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class SettingsGenerator extends FrameGenerator
{
private final boolean useDirectByteBuffers;
- public SettingsGenerator(RetainableByteBufferPool bufferPool, boolean useDirectByteBuffers)
+ public SettingsGenerator(ByteBufferPool bufferPool, boolean useDirectByteBuffers)
{
super(bufferPool);
this.useDirectByteBuffers = useDirectByteBuffers;
}
@Override
- public int generate(RetainableByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
+ public int generate(ByteBufferPool.Accumulator accumulator, long streamId, Frame frame, Consumer fail)
{
SettingsFrame settingsFrame = (SettingsFrame)frame;
return generateSettings(accumulator, settingsFrame);
}
- private int generateSettings(RetainableByteBufferPool.Accumulator accumulator, SettingsFrame frame)
+ private int generateSettings(ByteBufferPool.Accumulator accumulator, SettingsFrame frame)
{
int length = 0;
Map settings = frame.getSettings();
@@ -50,7 +50,7 @@ public class SettingsGenerator extends FrameGenerator
length += VarLenInt.length(e.getKey()) + VarLenInt.length(e.getValue());
}
int capacity = VarLenInt.length(frame.getFrameType().type()) + VarLenInt.length(length) + length;
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(capacity, useDirectByteBuffers);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(capacity, useDirectByteBuffers);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
VarLenInt.encode(byteBuffer, frame.getFrameType().type());
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/internal/ControlStreamConnection.java b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/internal/ControlStreamConnection.java
index c3152c46563..65116f21202 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/internal/ControlStreamConnection.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/internal/ControlStreamConnection.java
@@ -18,10 +18,10 @@ import java.util.concurrent.Executor;
import org.eclipse.jetty.http3.parser.ControlParser;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,12 +32,12 @@ public class ControlStreamConnection extends AbstractConnection implements Conne
public static final long STREAM_TYPE = 0x00;
private static final Logger LOG = LoggerFactory.getLogger(ControlStreamConnection.class);
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final ControlParser parser;
private boolean useInputDirectByteBuffers = true;
private RetainableByteBuffer buffer;
- public ControlStreamConnection(EndPoint endPoint, Executor executor, RetainableByteBufferPool bufferPool, ControlParser parser)
+ public ControlStreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, ControlParser parser)
{
super(endPoint, executor);
this.bufferPool = bufferPool;
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/DataGenerateParseTest.java b/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/DataGenerateParseTest.java
index f0e003d48ef..3161c4d8474 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/DataGenerateParseTest.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/DataGenerateParseTest.java
@@ -23,7 +23,7 @@ import org.eclipse.jetty.http3.frames.DataFrame;
import org.eclipse.jetty.http3.generator.MessageGenerator;
import org.eclipse.jetty.http3.parser.MessageParser;
import org.eclipse.jetty.http3.parser.ParserListener;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.junit.jupiter.api.Test;
@@ -53,8 +53,8 @@ public class DataGenerateParseTest
byteBuffer.get(inputBytes);
DataFrame input = new DataFrame(ByteBuffer.wrap(inputBytes), true);
- RetainableByteBufferPool.NonPooling bufferPool = new RetainableByteBufferPool.NonPooling();
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.NonPooling bufferPool = new ByteBufferPool.NonPooling();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
new MessageGenerator(bufferPool, null, 8192, true).generate(accumulator, 0, input, null);
List frames = new ArrayList<>();
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/GoAwayGenerateParseTest.java b/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/GoAwayGenerateParseTest.java
index a3d1dfd0903..8aab0dd64c9 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/GoAwayGenerateParseTest.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/GoAwayGenerateParseTest.java
@@ -21,7 +21,7 @@ import org.eclipse.jetty.http3.frames.GoAwayFrame;
import org.eclipse.jetty.http3.generator.ControlGenerator;
import org.eclipse.jetty.http3.parser.ControlParser;
import org.eclipse.jetty.http3.parser.ParserListener;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -34,8 +34,8 @@ public class GoAwayGenerateParseTest
{
GoAwayFrame input = GoAwayFrame.CLIENT_GRACEFUL;
- RetainableByteBufferPool.NonPooling bufferPool = new RetainableByteBufferPool.NonPooling();
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.NonPooling bufferPool = new ByteBufferPool.NonPooling();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
new ControlGenerator(bufferPool, true).generate(accumulator, 0, input, null);
List frames = new ArrayList<>();
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/HeadersGenerateParseTest.java b/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/HeadersGenerateParseTest.java
index 45e2e181ca3..056835659cd 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/HeadersGenerateParseTest.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/HeadersGenerateParseTest.java
@@ -29,7 +29,7 @@ import org.eclipse.jetty.http3.parser.MessageParser;
import org.eclipse.jetty.http3.parser.ParserListener;
import org.eclipse.jetty.http3.qpack.QpackDecoder;
import org.eclipse.jetty.http3.qpack.QpackEncoder;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -46,9 +46,9 @@ public class HeadersGenerateParseTest
.put("Cookie", "c=d");
HeadersFrame input = new HeadersFrame(new MetaData.Request(HttpMethod.GET.asString(), uri, HttpVersion.HTTP_3, fields), true);
- RetainableByteBufferPool.NonPooling bufferPool = new RetainableByteBufferPool.NonPooling();
+ ByteBufferPool.NonPooling bufferPool = new ByteBufferPool.NonPooling();
QpackEncoder encoder = new QpackEncoder(bufferPool, instructions -> {}, 100);
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
new MessageGenerator(bufferPool, encoder, 8192, true).generate(accumulator, 0, input, null);
QpackDecoder decoder = new QpackDecoder(bufferPool, instructions -> {}, 8192);
diff --git a/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/SettingsGenerateParseTest.java b/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/SettingsGenerateParseTest.java
index 38664034d3b..12c6e51e0a5 100644
--- a/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/SettingsGenerateParseTest.java
+++ b/jetty-core/jetty-http3/jetty-http3-common/src/test/java/org/eclipse/jetty/http3/internal/SettingsGenerateParseTest.java
@@ -22,7 +22,7 @@ import org.eclipse.jetty.http3.frames.SettingsFrame;
import org.eclipse.jetty.http3.generator.ControlGenerator;
import org.eclipse.jetty.http3.parser.ControlParser;
import org.eclipse.jetty.http3.parser.ParserListener;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -46,8 +46,8 @@ public class SettingsGenerateParseTest
{
SettingsFrame input = new SettingsFrame(settings);
- RetainableByteBufferPool.NonPooling bufferPool = new RetainableByteBufferPool.NonPooling();
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.NonPooling bufferPool = new ByteBufferPool.NonPooling();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
new ControlGenerator(bufferPool, true).generate(accumulator, 0, input, null);
List frames = new ArrayList<>();
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/Instruction.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/Instruction.java
index 66824705efa..0bccf68a322 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/Instruction.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/Instruction.java
@@ -15,11 +15,11 @@ package org.eclipse.jetty.http3.qpack;
import java.util.List;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public interface Instruction
{
- void encode(RetainableByteBufferPool.Accumulator accumulator);
+ void encode(ByteBufferPool.Accumulator accumulator);
/**
* A handler for instructions issued by an {@link QpackEncoder} or {@link QpackDecoder}.
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/QpackDecoder.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/QpackDecoder.java
index 9c667a1a7fb..81ad2c30e5f 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/QpackDecoder.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/QpackDecoder.java
@@ -34,7 +34,7 @@ import org.eclipse.jetty.http3.qpack.internal.table.DynamicTable;
import org.eclipse.jetty.http3.qpack.internal.table.Entry;
import org.eclipse.jetty.http3.qpack.internal.table.StaticTable;
import org.eclipse.jetty.http3.qpack.internal.util.NBitIntegerParser;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.component.Dumpable;
import org.slf4j.Logger;
@@ -56,7 +56,7 @@ public class QpackDecoder implements Dumpable
private final NBitIntegerParser _integerDecoder = new NBitIntegerParser();
private final InstructionHandler _instructionHandler = new InstructionHandler();
private final Map _blockedStreams = new HashMap<>();
- private final RetainableByteBufferPool _bufferPool;
+ private final ByteBufferPool _bufferPool;
private int _maxHeaderSize;
private int _maxBlockedStreams;
@@ -82,7 +82,7 @@ public class QpackDecoder implements Dumpable
/**
* @param maxHeaderSize The maximum allowed size of a headers block, expressed as total of all name and value characters, plus 32 per field
*/
- public QpackDecoder(RetainableByteBufferPool bufferPool, Instruction.Handler handler, int maxHeaderSize)
+ public QpackDecoder(ByteBufferPool bufferPool, Instruction.Handler handler, int maxHeaderSize)
{
_bufferPool = bufferPool;
_context = new QpackContext();
@@ -91,7 +91,7 @@ public class QpackDecoder implements Dumpable
_maxHeaderSize = maxHeaderSize;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return _bufferPool;
}
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/QpackEncoder.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/QpackEncoder.java
index 190a6706320..d36a3a7e8a8 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/QpackEncoder.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/QpackEncoder.java
@@ -38,7 +38,7 @@ import org.eclipse.jetty.http3.qpack.internal.parser.EncoderInstructionParser;
import org.eclipse.jetty.http3.qpack.internal.table.DynamicTable;
import org.eclipse.jetty.http3.qpack.internal.table.Entry;
import org.eclipse.jetty.http3.qpack.internal.util.NBitIntegerEncoder;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.component.Dumpable;
import org.eclipse.jetty.util.thread.AutoLock;
@@ -90,7 +90,7 @@ public class QpackEncoder implements Dumpable
private final AutoLock lock = new AutoLock();
private final List _instructions = new ArrayList<>();
- private final RetainableByteBufferPool _bufferPool;
+ private final ByteBufferPool _bufferPool;
private final Instruction.Handler _handler;
private final QpackContext _context;
private int _maxBlockedStreams;
@@ -100,7 +100,7 @@ public class QpackEncoder implements Dumpable
private int _knownInsertCount = 0;
private int _blockedStreams = 0;
- public QpackEncoder(RetainableByteBufferPool bufferPool, Instruction.Handler handler, int maxBlockedStreams)
+ public QpackEncoder(ByteBufferPool bufferPool, Instruction.Handler handler, int maxBlockedStreams)
{
_bufferPool = bufferPool;
_handler = handler;
@@ -109,7 +109,7 @@ public class QpackEncoder implements Dumpable
_parser = new EncoderInstructionParser(_instructionHandler);
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return _bufferPool;
}
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/AbstractInstruction.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/AbstractInstruction.java
index 277d66e87d1..b3627d3ded3 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/AbstractInstruction.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/AbstractInstruction.java
@@ -14,18 +14,18 @@
package org.eclipse.jetty.http3.qpack.internal.instruction;
import org.eclipse.jetty.http3.qpack.Instruction;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public abstract class AbstractInstruction implements Instruction
{
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
- protected AbstractInstruction(RetainableByteBufferPool bufferPool)
+ protected AbstractInstruction(ByteBufferPool bufferPool)
{
this.bufferPool = bufferPool;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/DuplicateInstruction.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/DuplicateInstruction.java
index f9c6e362229..15cbffbbe98 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/DuplicateInstruction.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/DuplicateInstruction.java
@@ -16,15 +16,15 @@ package org.eclipse.jetty.http3.qpack.internal.instruction;
import java.nio.ByteBuffer;
import org.eclipse.jetty.http3.qpack.internal.util.NBitIntegerEncoder;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class DuplicateInstruction extends AbstractInstruction
{
private final int _index;
- public DuplicateInstruction(RetainableByteBufferPool bufferPool, int index)
+ public DuplicateInstruction(ByteBufferPool bufferPool, int index)
{
super(bufferPool);
_index = index;
@@ -36,10 +36,10 @@ public class DuplicateInstruction extends AbstractInstruction
}
@Override
- public void encode(RetainableByteBufferPool.Accumulator accumulator)
+ public void encode(ByteBufferPool.Accumulator accumulator)
{
int size = NBitIntegerEncoder.octetsNeeded(5, _index) + 1;
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(size, false);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(size, false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
byteBuffer.put((byte)0x00);
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/IndexedNameEntryInstruction.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/IndexedNameEntryInstruction.java
index 0e66dd59652..2b315560679 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/IndexedNameEntryInstruction.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/IndexedNameEntryInstruction.java
@@ -17,8 +17,8 @@ import java.nio.ByteBuffer;
import org.eclipse.jetty.http3.qpack.internal.util.HuffmanEncoder;
import org.eclipse.jetty.http3.qpack.internal.util.NBitIntegerEncoder;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class IndexedNameEntryInstruction extends AbstractInstruction
@@ -28,7 +28,7 @@ public class IndexedNameEntryInstruction extends AbstractInstruction
private final boolean _huffman;
private final String _value;
- public IndexedNameEntryInstruction(RetainableByteBufferPool bufferPool, boolean dynamic, int index, boolean huffman, String value)
+ public IndexedNameEntryInstruction(ByteBufferPool bufferPool, boolean dynamic, int index, boolean huffman, String value)
{
super(bufferPool);
_dynamic = dynamic;
@@ -53,10 +53,10 @@ public class IndexedNameEntryInstruction extends AbstractInstruction
}
@Override
- public void encode(RetainableByteBufferPool.Accumulator accumulator)
+ public void encode(ByteBufferPool.Accumulator accumulator)
{
int size = NBitIntegerEncoder.octetsNeeded(6, _index) + (_huffman ? HuffmanEncoder.octetsNeeded(_value) : _value.length()) + 2;
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(size, false);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(size, false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/InsertCountIncrementInstruction.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/InsertCountIncrementInstruction.java
index 5bff85dc91e..a9cbc5a4c5e 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/InsertCountIncrementInstruction.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/InsertCountIncrementInstruction.java
@@ -16,15 +16,15 @@ package org.eclipse.jetty.http3.qpack.internal.instruction;
import java.nio.ByteBuffer;
import org.eclipse.jetty.http3.qpack.internal.util.NBitIntegerEncoder;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class InsertCountIncrementInstruction extends AbstractInstruction
{
private final int _increment;
- public InsertCountIncrementInstruction(RetainableByteBufferPool bufferPool, int increment)
+ public InsertCountIncrementInstruction(ByteBufferPool bufferPool, int increment)
{
super(bufferPool);
_increment = increment;
@@ -36,10 +36,10 @@ public class InsertCountIncrementInstruction extends AbstractInstruction
}
@Override
- public void encode(RetainableByteBufferPool.Accumulator accumulator)
+ public void encode(ByteBufferPool.Accumulator accumulator)
{
int size = NBitIntegerEncoder.octetsNeeded(6, _increment) + 1;
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(size, false);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(size, false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
byteBuffer.put((byte)0x00);
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/LiteralNameEntryInstruction.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/LiteralNameEntryInstruction.java
index a2c2c5c26dd..6ccd51a4c46 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/LiteralNameEntryInstruction.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/LiteralNameEntryInstruction.java
@@ -18,8 +18,8 @@ import java.nio.ByteBuffer;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http3.qpack.internal.util.HuffmanEncoder;
import org.eclipse.jetty.http3.qpack.internal.util.NBitIntegerEncoder;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class LiteralNameEntryInstruction extends AbstractInstruction
@@ -29,12 +29,12 @@ public class LiteralNameEntryInstruction extends AbstractInstruction
private final String _name;
private final String _value;
- public LiteralNameEntryInstruction(RetainableByteBufferPool bufferPool, HttpField httpField, boolean huffman)
+ public LiteralNameEntryInstruction(ByteBufferPool bufferPool, HttpField httpField, boolean huffman)
{
this(bufferPool, httpField, huffman, huffman);
}
- public LiteralNameEntryInstruction(RetainableByteBufferPool bufferPool, HttpField httpField, boolean huffmanName, boolean huffmanValue)
+ public LiteralNameEntryInstruction(ByteBufferPool bufferPool, HttpField httpField, boolean huffmanName, boolean huffmanValue)
{
super(bufferPool);
_huffmanName = huffmanName;
@@ -54,11 +54,11 @@ public class LiteralNameEntryInstruction extends AbstractInstruction
}
@Override
- public void encode(RetainableByteBufferPool.Accumulator accumulator)
+ public void encode(ByteBufferPool.Accumulator accumulator)
{
int size = (_huffmanName ? HuffmanEncoder.octetsNeeded(_name) : _name.length()) +
(_huffmanValue ? HuffmanEncoder.octetsNeeded(_value) : _value.length()) + 2;
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(size, false);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(size, false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/SectionAcknowledgmentInstruction.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/SectionAcknowledgmentInstruction.java
index 85cd979072d..be9b003c5ec 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/SectionAcknowledgmentInstruction.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/SectionAcknowledgmentInstruction.java
@@ -16,15 +16,15 @@ package org.eclipse.jetty.http3.qpack.internal.instruction;
import java.nio.ByteBuffer;
import org.eclipse.jetty.http3.qpack.internal.util.NBitIntegerEncoder;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class SectionAcknowledgmentInstruction extends AbstractInstruction
{
private final long _streamId;
- public SectionAcknowledgmentInstruction(RetainableByteBufferPool bufferPool, long streamId)
+ public SectionAcknowledgmentInstruction(ByteBufferPool bufferPool, long streamId)
{
super(bufferPool);
_streamId = streamId;
@@ -36,10 +36,10 @@ public class SectionAcknowledgmentInstruction extends AbstractInstruction
}
@Override
- public void encode(RetainableByteBufferPool.Accumulator accumulator)
+ public void encode(ByteBufferPool.Accumulator accumulator)
{
int size = NBitIntegerEncoder.octetsNeeded(7, _streamId) + 1;
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(size, false);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(size, false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
byteBuffer.put((byte)0x80);
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/SetCapacityInstruction.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/SetCapacityInstruction.java
index 9582db62b87..fc6136f4384 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/SetCapacityInstruction.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/SetCapacityInstruction.java
@@ -16,15 +16,15 @@ package org.eclipse.jetty.http3.qpack.internal.instruction;
import java.nio.ByteBuffer;
import org.eclipse.jetty.http3.qpack.internal.util.NBitIntegerEncoder;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class SetCapacityInstruction extends AbstractInstruction
{
private final int _capacity;
- public SetCapacityInstruction(RetainableByteBufferPool bufferPool, int capacity)
+ public SetCapacityInstruction(ByteBufferPool bufferPool, int capacity)
{
super(bufferPool);
_capacity = capacity;
@@ -36,10 +36,10 @@ public class SetCapacityInstruction extends AbstractInstruction
}
@Override
- public void encode(RetainableByteBufferPool.Accumulator accumulator)
+ public void encode(ByteBufferPool.Accumulator accumulator)
{
int size = NBitIntegerEncoder.octetsNeeded(5, _capacity) + 1;
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(size, false);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(size, false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
byteBuffer.put((byte)0x20);
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/StreamCancellationInstruction.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/StreamCancellationInstruction.java
index ae3ad81b59e..f109d731a39 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/StreamCancellationInstruction.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/main/java/org/eclipse/jetty/http3/qpack/internal/instruction/StreamCancellationInstruction.java
@@ -16,25 +16,25 @@ package org.eclipse.jetty.http3.qpack.internal.instruction;
import java.nio.ByteBuffer;
import org.eclipse.jetty.http3.qpack.internal.util.NBitIntegerEncoder;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
public class StreamCancellationInstruction extends AbstractInstruction
{
private final long _streamId;
- public StreamCancellationInstruction(RetainableByteBufferPool bufferPool, long streamId)
+ public StreamCancellationInstruction(ByteBufferPool bufferPool, long streamId)
{
super(bufferPool);
_streamId = streamId;
}
@Override
- public void encode(RetainableByteBufferPool.Accumulator accumulator)
+ public void encode(ByteBufferPool.Accumulator accumulator)
{
int size = NBitIntegerEncoder.octetsNeeded(6, _streamId) + 1;
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(size, false);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(size, false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
BufferUtil.clearToFill(byteBuffer);
byteBuffer.put((byte)0x40);
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/BlockedStreamsTest.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/BlockedStreamsTest.java
index c72e0a9621c..65db3d5b7b7 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/BlockedStreamsTest.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/BlockedStreamsTest.java
@@ -24,7 +24,7 @@ import org.eclipse.jetty.http3.qpack.internal.instruction.LiteralNameEntryInstru
import org.eclipse.jetty.http3.qpack.internal.instruction.SectionAcknowledgmentInstruction;
import org.eclipse.jetty.http3.qpack.internal.instruction.SetCapacityInstruction;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -56,7 +56,7 @@ public class BlockedStreamsTest
{
_encoderHandler = new TestEncoderHandler();
_decoderHandler = new TestDecoderHandler();
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
_encoder = new QpackEncoder(bufferPool, _encoderHandler, MAX_BLOCKED_STREAMS);
_decoder = new QpackDecoder(bufferPool, _decoderHandler, MAX_HEADER_SIZE);
}
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/EncodeDecodeTest.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/EncodeDecodeTest.java
index f2b8b6baf60..352883686f3 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/EncodeDecodeTest.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/EncodeDecodeTest.java
@@ -28,7 +28,7 @@ import org.eclipse.jetty.http3.qpack.internal.instruction.SetCapacityInstruction
import org.eclipse.jetty.http3.qpack.internal.parser.DecoderInstructionParser;
import org.eclipse.jetty.http3.qpack.internal.parser.EncoderInstructionParser;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
@@ -58,7 +58,7 @@ public class EncodeDecodeTest
{
_encoderHandler = new TestEncoderHandler();
_decoderHandler = new TestDecoderHandler();
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
_encoder = new QpackEncoder(bufferPool, _encoderHandler, MAX_BLOCKED_STREAMS)
{
@Override
@@ -94,7 +94,7 @@ public class EncodeDecodeTest
assertThat(_decoderHandler.getInstruction(), instanceOf(SectionAcknowledgmentInstruction.class));
assertTrue(_decoderHandler.isEmpty());
- _encoderInstructionParser.parse(QpackTestUtil.toBuffer(List.of(new SectionAcknowledgmentInstruction(_encoder.getRetainableByteBufferPool(), streamId))));
+ _encoderInstructionParser.parse(QpackTestUtil.toBuffer(List.of(new SectionAcknowledgmentInstruction(_encoder.getByteBufferPool(), streamId))));
// B.2. Dynamic Table.
@@ -146,8 +146,8 @@ public class EncodeDecodeTest
assertTrue(_decoderHandler.isEmpty());
// Parse the decoder instructions on the encoder.
- _encoderInstructionParser.parse(QpackTestUtil.toBuffer(List.of(new InsertCountIncrementInstruction(_encoder.getRetainableByteBufferPool(), 2))));
- _encoderInstructionParser.parse(QpackTestUtil.toBuffer(List.of(new SectionAcknowledgmentInstruction(_encoder.getRetainableByteBufferPool(), streamId))));
+ _encoderInstructionParser.parse(QpackTestUtil.toBuffer(List.of(new InsertCountIncrementInstruction(_encoder.getByteBufferPool(), 2))));
+ _encoderInstructionParser.parse(QpackTestUtil.toBuffer(List.of(new SectionAcknowledgmentInstruction(_encoder.getByteBufferPool(), streamId))));
// B.3. Speculative Insert
_encoder.insert(new HttpField("custom-key", "custom-value"));
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/EvictionTest.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/EvictionTest.java
index a24b3664cc8..36e1e022a31 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/EvictionTest.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/EvictionTest.java
@@ -21,7 +21,7 @@ import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.http.MetaData;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -42,7 +42,7 @@ public class EvictionTest
@BeforeEach
public void before()
{
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
_decoder = new QpackDecoder(bufferPool, _decoderHandler, MAX_HEADER_SIZE);
_encoder = new QpackEncoder(bufferPool, _encoderHandler, MAX_BLOCKED_STREAMS)
{
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/InstructionGeneratorTest.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/InstructionGeneratorTest.java
index 42eb19789ee..0effadc7ddc 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/InstructionGeneratorTest.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/InstructionGeneratorTest.java
@@ -16,7 +16,7 @@ package org.eclipse.jetty.http3.qpack;
import org.eclipse.jetty.http3.qpack.internal.instruction.IndexedNameEntryInstruction;
import org.eclipse.jetty.http3.qpack.internal.instruction.SectionAcknowledgmentInstruction;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.junit.jupiter.api.Test;
@@ -26,11 +26,11 @@ import static org.hamcrest.Matchers.is;
public class InstructionGeneratorTest
{
- private final RetainableByteBufferPool _bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool _bufferPool = new ArrayRetainableByteBufferPool();
private String toHexString(Instruction instruction)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
instruction.encode(accumulator);
assertThat(accumulator.getSize(), is(1));
return BufferUtil.toHexString(accumulator.getByteBuffers().get(0));
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/QpackTestUtil.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/QpackTestUtil.java
index 4040d85cc62..858c95012bb 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/QpackTestUtil.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/QpackTestUtil.java
@@ -20,7 +20,7 @@ import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.http.MetaData;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.StringUtil;
import org.hamcrest.Matcher;
@@ -32,7 +32,7 @@ public class QpackTestUtil
{
public static ByteBuffer toBuffer(Instruction... instructions)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
for (Instruction instruction : instructions)
{
instruction.encode(accumulator);
@@ -55,7 +55,7 @@ public class QpackTestUtil
public static ByteBuffer toBuffer(List instructions)
{
- RetainableByteBufferPool.Accumulator accumulator = new RetainableByteBufferPool.Accumulator();
+ ByteBufferPool.Accumulator accumulator = new ByteBufferPool.Accumulator();
instructions.forEach(i -> i.encode(accumulator));
assertThat(accumulator.getSize(), is(instructions.size()));
ByteBuffer combinedBuffer = BufferUtil.allocate(Math.toIntExact(accumulator.getTotalLength()), false);
diff --git a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/SectionAcknowledgmentTest.java b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/SectionAcknowledgmentTest.java
index f58d30a74e7..adc88e5bee7 100644
--- a/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/SectionAcknowledgmentTest.java
+++ b/jetty-core/jetty-http3/jetty-http3-qpack/src/test/java/org/eclipse/jetty/http3/qpack/SectionAcknowledgmentTest.java
@@ -18,7 +18,7 @@ import java.nio.ByteBuffer;
import org.eclipse.jetty.http3.qpack.QpackException.SessionException;
import org.eclipse.jetty.http3.qpack.internal.instruction.SectionAcknowledgmentInstruction;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -48,7 +48,7 @@ public class SectionAcknowledgmentTest
{
_encoderHandler = new TestEncoderHandler();
_decoderHandler = new TestDecoderHandler();
- RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
_encoder = new QpackEncoder(bufferPool, _encoderHandler, MAX_BLOCKED_STREAMS);
_decoder = new QpackDecoder(bufferPool, _decoderHandler, MAX_HEADER_SIZE);
}
@@ -77,7 +77,7 @@ public class SectionAcknowledgmentTest
assertThat(BufferUtil.remaining(buffer), greaterThan(0L));
// Parsing a section ack instruction on the encoder when we are not expecting it should result in QPACK_DECODER_STREAM_ERROR.
- SectionAcknowledgmentInstruction instruction = new SectionAcknowledgmentInstruction(_encoder.getRetainableByteBufferPool(), 0);
+ SectionAcknowledgmentInstruction instruction = new SectionAcknowledgmentInstruction(_encoder.getByteBufferPool(), 0);
ByteBuffer instructionBuffer = toBuffer(instruction);
SessionException error = assertThrows(SessionException.class, () -> _encoder.parseInstructions(instructionBuffer));
assertThat(error.getErrorCode(), equalTo(QpackException.QPACK_ENCODER_STREAM_ERROR));
diff --git a/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/HTTP3ServerConnector.java b/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/HTTP3ServerConnector.java
index dc83937ae02..b8aa6230be2 100644
--- a/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/HTTP3ServerConnector.java
+++ b/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/HTTP3ServerConnector.java
@@ -18,7 +18,7 @@ import java.util.concurrent.Executor;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.PreEncodedHttpField;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.quic.server.QuicServerConnector;
import org.eclipse.jetty.server.ConnectionFactory;
import org.eclipse.jetty.server.Server;
@@ -44,7 +44,7 @@ public class HTTP3ServerConnector extends QuicServerConnector
this(server, null, null, null, sslContextFactory, factories);
}
- public HTTP3ServerConnector(Server server, Executor executor, Scheduler scheduler, RetainableByteBufferPool bufferPool, SslContextFactory.Server sslContextFactory, ConnectionFactory... factories)
+ public HTTP3ServerConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, SslContextFactory.Server sslContextFactory, ConnectionFactory... factories)
{
super(server, executor, scheduler, bufferPool, sslContextFactory, factories);
// Max concurrent streams that a client can open.
diff --git a/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/internal/ServerHTTP3Session.java b/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/internal/ServerHTTP3Session.java
index 7b621be3232..4229a6fded0 100644
--- a/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/internal/ServerHTTP3Session.java
+++ b/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/internal/ServerHTTP3Session.java
@@ -30,7 +30,7 @@ import org.eclipse.jetty.http3.frames.Frame;
import org.eclipse.jetty.http3.frames.SettingsFrame;
import org.eclipse.jetty.http3.qpack.QpackDecoder;
import org.eclipse.jetty.http3.qpack.QpackEncoder;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.quic.common.QuicStreamEndPoint;
import org.eclipse.jetty.quic.common.StreamType;
import org.eclipse.jetty.quic.server.ServerProtocolSession;
@@ -63,7 +63,7 @@ public class ServerHTTP3Session extends ServerProtocolSession
long encoderStreamId = getQuicSession().newStreamId(StreamType.SERVER_UNIDIRECTIONAL);
QuicStreamEndPoint encoderEndPoint = openInstructionEndPoint(encoderStreamId);
InstructionFlusher encoderInstructionFlusher = new InstructionFlusher(quicSession, encoderEndPoint, EncoderStreamConnection.STREAM_TYPE);
- RetainableByteBufferPool bufferPool = quicSession.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = quicSession.getByteBufferPool();
this.encoder = new QpackEncoder(bufferPool, new InstructionHandler(encoderInstructionFlusher), configuration.getMaxBlockedStreams());
addBean(encoder);
if (LOG.isDebugEnabled())
@@ -84,7 +84,7 @@ public class ServerHTTP3Session extends ServerProtocolSession
if (LOG.isDebugEnabled())
LOG.debug("created control stream #{} on {}", controlStreamId, controlEndPoint);
- this.messageFlusher = new MessageFlusher(quicSession.getRetainableByteBufferPool(), encoder, configuration.getMaxResponseHeadersSize(), configuration.isUseOutputDirectByteBuffers());
+ this.messageFlusher = new MessageFlusher(quicSession.getByteBufferPool(), encoder, configuration.getMaxResponseHeadersSize(), configuration.isUseOutputDirectByteBuffers());
addBean(messageFlusher);
}
@@ -191,7 +191,7 @@ public class ServerHTTP3Session extends ServerProtocolSession
private void openUnidirectionalStreamEndPoint(QuicStreamEndPoint endPoint)
{
- UnidirectionalStreamConnection connection = new UnidirectionalStreamConnection(endPoint, getQuicSession().getExecutor(), getQuicSession().getRetainableByteBufferPool(), encoder, decoder, session);
+ UnidirectionalStreamConnection connection = new UnidirectionalStreamConnection(endPoint, getQuicSession().getExecutor(), getQuicSession().getByteBufferPool(), encoder, decoder, session);
endPoint.setConnection(connection);
endPoint.opened();
}
diff --git a/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/internal/ServerHTTP3StreamConnection.java b/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/internal/ServerHTTP3StreamConnection.java
index b80f0526501..b2a142c031f 100644
--- a/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/internal/ServerHTTP3StreamConnection.java
+++ b/jetty-core/jetty-http3/jetty-http3-server/src/main/java/org/eclipse/jetty/http3/server/internal/ServerHTTP3StreamConnection.java
@@ -42,7 +42,7 @@ public class ServerHTTP3StreamConnection extends HTTP3StreamConnection implement
public ServerHTTP3StreamConnection(Connector connector, HttpConfiguration httpConfiguration, QuicStreamEndPoint endPoint, ServerHTTP3Session session, MessageParser parser)
{
- super(endPoint, connector.getExecutor(), connector.getRetainableByteBufferPool(), parser);
+ super(endPoint, connector.getExecutor(), connector.getByteBufferPool(), parser);
this.connector = connector;
this.httpConfiguration = httpConfiguration;
this.session = session;
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ArrayRetainableByteBufferPool.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ArrayRetainableByteBufferPool.java
index 58d74f79fb8..4f69851bfbd 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ArrayRetainableByteBufferPool.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ArrayRetainableByteBufferPool.java
@@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory;
* divided by 8.
*/
@ManagedObject
-public class ArrayRetainableByteBufferPool implements RetainableByteBufferPool, Dumpable
+public class ArrayRetainableByteBufferPool implements ByteBufferPool, Dumpable
{
private static final Logger LOG = LoggerFactory.getLogger(ArrayRetainableByteBufferPool.class);
static final int DEFAULT_FACTOR = 4096;
@@ -336,7 +336,7 @@ public class ArrayRetainableByteBufferPool implements RetainableByteBufferPool,
return total;
}
- @ManagedOperation(value = "Clears this RetainableByteBufferPool", impact = "ACTION")
+ @ManagedOperation(value = "Clears this ByteBufferPool", impact = "ACTION")
public void clear()
{
clearArray(_direct, _currentDirectMemory);
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferAccumulator.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferAccumulator.java
index 90f05e773ef..b279152a603 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferAccumulator.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferAccumulator.java
@@ -24,7 +24,7 @@ import org.eclipse.jetty.util.BufferUtil;
/**
* Accumulates data into a list of ByteBuffers which can then be combined into a single buffer or written to an OutputStream.
* The buffer list automatically grows as data is written to it, the buffers are taken from the
- * supplied {@link RetainableByteBufferPool} or freshly allocated if one is not supplied.
+ * supplied {@link ByteBufferPool} or freshly allocated if one is not supplied.
*
* The method {@link #ensureBuffer(int, int)} is used to write directly to the last buffer stored in the buffer list,
* if there is less than a certain amount of space available in that buffer then a new one will be allocated and returned instead.
@@ -34,7 +34,7 @@ import org.eclipse.jetty.util.BufferUtil;
public class ByteBufferAccumulator implements AutoCloseable
{
private final List _buffers = new ArrayList<>();
- private final RetainableByteBufferPool _bufferPool;
+ private final ByteBufferPool _bufferPool;
private final boolean _direct;
public ByteBufferAccumulator()
@@ -42,9 +42,9 @@ public class ByteBufferAccumulator implements AutoCloseable
this(null, false);
}
- public ByteBufferAccumulator(RetainableByteBufferPool bufferPool, boolean direct)
+ public ByteBufferAccumulator(ByteBufferPool bufferPool, boolean direct)
{
- _bufferPool = (bufferPool == null) ? new RetainableByteBufferPool.NonPooling() : bufferPool;
+ _bufferPool = (bufferPool == null) ? new ByteBufferPool.NonPooling() : bufferPool;
_direct = direct;
}
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferOutputStream2.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferOutputStream2.java
index fd8fda345e8..5267815dec9 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferOutputStream2.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferOutputStream2.java
@@ -20,7 +20,7 @@ import java.nio.ByteBuffer;
/**
* This class implements an output stream in which the data is written into a list of ByteBuffer,
* the buffer list automatically grows as data is written to it, the buffers are taken from the
- * supplied {@link RetainableByteBufferPool} or freshly allocated if one is not supplied.
+ * supplied {@link ByteBufferPool} or freshly allocated if one is not supplied.
*
* Designed to mimic {@link java.io.ByteArrayOutputStream} but with better memory usage, and less copying.
*/
@@ -34,9 +34,9 @@ public class ByteBufferOutputStream2 extends OutputStream
this(null, false);
}
- public ByteBufferOutputStream2(RetainableByteBufferPool bufferPool, boolean direct)
+ public ByteBufferOutputStream2(ByteBufferPool bufferPool, boolean direct)
{
- _accumulator = new ByteBufferAccumulator(bufferPool == null ? new RetainableByteBufferPool.NonPooling() : bufferPool, direct);
+ _accumulator = new ByteBufferAccumulator(bufferPool == null ? new ByteBufferPool.NonPooling() : bufferPool, direct);
}
/**
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBufferPool.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferPool.java
similarity index 92%
rename from jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBufferPool.java
rename to jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferPool.java
index d031144c622..db617d4d566 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBufferPool.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferPool.java
@@ -43,7 +43,7 @@ import org.eclipse.jetty.util.BufferUtil;
* buffer returned by {@link #acquire(int, boolean)} must be wrapped, see
* {@link RetainableByteBuffer.Wrapper}
*/
-public interface RetainableByteBufferPool
+public interface ByteBufferPool
{
/**
* Acquires a {@link RetainableByteBuffer} from this pool.
@@ -61,18 +61,18 @@ public interface RetainableByteBufferPool
void clear();
/**
- * A wrapper for {@link RetainableByteBufferPool} instances.
+ * A wrapper for {@link ByteBufferPool} instances.
*/
- class Wrapper implements RetainableByteBufferPool
+ class Wrapper implements ByteBufferPool
{
- private final RetainableByteBufferPool wrapped;
+ private final ByteBufferPool wrapped;
- public Wrapper(RetainableByteBufferPool wrapped)
+ public Wrapper(ByteBufferPool wrapped)
{
this.wrapped = wrapped;
}
- public RetainableByteBufferPool getWrapped()
+ public ByteBufferPool getWrapped()
{
return wrapped;
}
@@ -91,7 +91,7 @@ public interface RetainableByteBufferPool
}
/**
- * A {@link RetainableByteBufferPool} that does not pool its
+ *
A {@link ByteBufferPool} that does not pool its
* {@link RetainableByteBuffer}s.
* The returned {@code RetainableByteBuffer}s are reference
* counted.
@@ -102,7 +102,7 @@ public interface RetainableByteBufferPool
*
* @see RetainableByteBuffer#wrap(ByteBuffer)
*/
- class NonPooling implements RetainableByteBufferPool
+ class NonPooling implements ByteBufferPool
{
@Override
public RetainableByteBuffer acquire(int size, boolean direct)
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java
index df900ad99b8..216747747d9 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java
@@ -94,7 +94,7 @@ public class ClientConnector extends ContainerLifeCycle
private final Configurator configurator;
private Executor executor;
private Scheduler scheduler;
- private RetainableByteBufferPool retainableByteBufferPool;
+ private ByteBufferPool byteBufferPool;
private SslContextFactory.Client sslContextFactory;
private SelectorManager selectorManager;
private int selectors = 1;
@@ -155,17 +155,17 @@ public class ClientConnector extends ContainerLifeCycle
this.scheduler = scheduler;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return retainableByteBufferPool;
+ return byteBufferPool;
}
- public void setRetainableByteBufferPool(RetainableByteBufferPool retainableByteBufferPool)
+ public void setByteBufferPool(ByteBufferPool byteBufferPool)
{
if (isStarted())
throw new IllegalStateException();
- updateBean(this.retainableByteBufferPool, retainableByteBufferPool);
- this.retainableByteBufferPool = retainableByteBufferPool;
+ updateBean(this.byteBufferPool, byteBufferPool);
+ this.byteBufferPool = byteBufferPool;
}
public SslContextFactory.Client getSslContextFactory()
@@ -366,8 +366,8 @@ public class ClientConnector extends ContainerLifeCycle
}
if (scheduler == null)
setScheduler(new ScheduledExecutorScheduler(String.format("client-scheduler@%x", hashCode()), false));
- if (retainableByteBufferPool == null)
- setRetainableByteBufferPool(new ArrayRetainableByteBufferPool());
+ if (byteBufferPool == null)
+ setByteBufferPool(new ArrayRetainableByteBufferPool());
if (sslContextFactory == null)
setSslContextFactory(newSslContextFactory());
selectorManager = newSelectorManager();
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java
index 38e2b5f4cc2..3555e35aa07 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java
@@ -21,7 +21,7 @@ import org.eclipse.jetty.util.BufferUtil;
/**
* A pooled {@link ByteBuffer} which maintains a reference count that is
* incremented with {@link #retain()} and decremented with {@link #release()}.
- * The {@code ByteBuffer} is released to a {@link RetainableByteBufferPool}
+ *
The {@code ByteBuffer} is released to a {@link ByteBufferPool}
* when {@link #release()} is called one more time than {@link #retain()};
* in such case, the call to {@link #release()} returns {@code true}.
* A {@code RetainableByteBuffer} can either be:
@@ -50,7 +50,7 @@ public interface RetainableByteBuffer extends Retainable
*
* @param byteBuffer the {@code ByteBuffer} to wrap
* @return a non-retainable {@code RetainableByteBuffer}
- * @see RetainableByteBufferPool.NonPooling
+ * @see ByteBufferPool.NonPooling
*/
public static RetainableByteBuffer wrap(ByteBuffer byteBuffer)
{
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/InputStreamContentSource.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/InputStreamContentSource.java
index 3f50132771d..3c42edbc498 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/InputStreamContentSource.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/InputStreamContentSource.java
@@ -16,9 +16,9 @@ package org.eclipse.jetty.io.content;
import java.io.InputStream;
import java.nio.ByteBuffer;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.thread.AutoLock;
import org.eclipse.jetty.util.thread.SerializedInvoker;
@@ -27,9 +27,9 @@ import org.eclipse.jetty.util.thread.SerializedInvoker;
*
* A {@link Content.Source} that is backed by an {@link InputStream}.
* Data is read from the {@link InputStream} into a buffer that is optionally acquired
- * from a {@link RetainableByteBufferPool}, and converted to a {@link Content.Chunk} that is
- * returned from {@link #read()}. If no {@link RetainableByteBufferPool} is provided, then
- * a {@link RetainableByteBufferPool.NonPooling} is used.
+ * from a {@link ByteBufferPool}, and converted to a {@link Content.Chunk} that is
+ * returned from {@link #read()}. If no {@link ByteBufferPool} is provided, then
+ * a {@link ByteBufferPool.NonPooling} is used.
*
*/
public class InputStreamContentSource implements Content.Source
@@ -37,7 +37,7 @@ public class InputStreamContentSource implements Content.Source
private final AutoLock lock = new AutoLock();
private final SerializedInvoker invoker = new SerializedInvoker();
private final InputStream inputStream;
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private int bufferSize = 4096;
private Runnable demandCallback;
private Content.Chunk.Error errorChunk;
@@ -48,10 +48,10 @@ public class InputStreamContentSource implements Content.Source
this(inputStream, null);
}
- public InputStreamContentSource(InputStream inputStream, RetainableByteBufferPool bufferPool)
+ public InputStreamContentSource(InputStream inputStream, ByteBufferPool bufferPool)
{
this.inputStream = inputStream;
- this.bufferPool = bufferPool != null ? bufferPool : new RetainableByteBufferPool.NonPooling();
+ this.bufferPool = bufferPool != null ? bufferPool : new ByteBufferPool.NonPooling();
}
public int getBufferSize()
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/PathContentSource.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/PathContentSource.java
index 04e05a6eb70..9e2227a2bae 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/PathContentSource.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/PathContentSource.java
@@ -23,9 +23,9 @@ import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.thread.AutoLock;
@@ -40,7 +40,7 @@ public class PathContentSource implements Content.Source
private final SerializedInvoker invoker = new SerializedInvoker();
private final Path path;
private final long length;
- private final RetainableByteBufferPool byteBufferPool;
+ private final ByteBufferPool byteBufferPool;
private int bufferSize = 4096;
private boolean useDirectByteBuffers = true;
private SeekableByteChannel channel;
@@ -53,7 +53,7 @@ public class PathContentSource implements Content.Source
this(path, null);
}
- public PathContentSource(Path path, RetainableByteBufferPool byteBufferPool)
+ public PathContentSource(Path path, ByteBufferPool byteBufferPool)
{
try
{
@@ -63,7 +63,7 @@ public class PathContentSource implements Content.Source
throw new AccessDeniedException(path.toString());
this.path = path;
this.length = Files.size(path);
- this.byteBufferPool = byteBufferPool != null ? byteBufferPool : new RetainableByteBufferPool.NonPooling();
+ this.byteBufferPool = byteBufferPool != null ? byteBufferPool : new ByteBufferPool.NonPooling();
}
catch (IOException x)
{
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java
index 826cab32813..9e166e49550 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java
@@ -24,11 +24,11 @@ import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLPeerUnverifiedException;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
import org.eclipse.jetty.util.ssl.SslContextFactory;
@@ -40,17 +40,17 @@ public class SslClientConnectionFactory implements ClientConnectionFactory
public static final String SSL_ENGINE_CONTEXT_KEY = "org.eclipse.jetty.client.ssl.engine";
private final SslContextFactory sslContextFactory;
- private final RetainableByteBufferPool retainableByteBufferPool;
+ private final ByteBufferPool byteBufferPool;
private final Executor executor;
private final ClientConnectionFactory connectionFactory;
private boolean _directBuffersForEncryption = true;
private boolean _directBuffersForDecryption = true;
private boolean _requireCloseMessage;
- public SslClientConnectionFactory(SslContextFactory sslContextFactory, RetainableByteBufferPool retainableByteBufferPool, Executor executor, ClientConnectionFactory connectionFactory)
+ public SslClientConnectionFactory(SslContextFactory sslContextFactory, ByteBufferPool byteBufferPool, Executor executor, ClientConnectionFactory connectionFactory)
{
this.sslContextFactory = Objects.requireNonNull(sslContextFactory, "Missing SslContextFactory");
- this.retainableByteBufferPool = retainableByteBufferPool;
+ this.byteBufferPool = byteBufferPool;
this.executor = executor;
this.connectionFactory = connectionFactory;
}
@@ -119,7 +119,7 @@ public class SslClientConnectionFactory implements ClientConnectionFactory
engine.setUseClientMode(true);
context.put(SSL_ENGINE_CONTEXT_KEY, engine);
- SslConnection sslConnection = newSslConnection(retainableByteBufferPool, executor, endPoint, engine);
+ SslConnection sslConnection = newSslConnection(byteBufferPool, executor, endPoint, engine);
EndPoint appEndPoint = sslConnection.getDecryptedEndPoint();
appEndPoint.setConnection(connectionFactory.newConnection(appEndPoint, context));
@@ -130,9 +130,9 @@ public class SslClientConnectionFactory implements ClientConnectionFactory
return sslConnection;
}
- protected SslConnection newSslConnection(RetainableByteBufferPool retainableByteBufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
+ protected SslConnection newSslConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
{
- return new SslConnection(retainableByteBufferPool, executor, endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption());
+ return new SslConnection(byteBufferPool, executor, endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption());
}
@Override
diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
index 62de21b0291..2b1961517dc 100644
--- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
+++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
@@ -32,10 +32,10 @@ import javax.net.ssl.SSLSession;
import org.eclipse.jetty.io.AbstractConnection;
import org.eclipse.jetty.io.AbstractEndPoint;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.WriteFlusher;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
@@ -108,7 +108,7 @@ public class SslConnection extends AbstractConnection implements Connection.Upgr
private final List handshakeListeners = new ArrayList<>();
private final AtomicLong _bytesIn = new AtomicLong();
private final AtomicLong _bytesOut = new AtomicLong();
- private final RetainableByteBufferPool _retainableByteBufferPool;
+ private final ByteBufferPool _retainableByteBufferPool;
private final SSLEngine _sslEngine;
private final DecryptedEndPoint _decryptedEndPoint;
private final boolean _encryptedDirectBuffers;
@@ -164,18 +164,18 @@ public class SslConnection extends AbstractConnection implements Connection.Upgr
}
};
- public SslConnection(RetainableByteBufferPool retainableByteBufferPool, Executor executor, EndPoint endPoint, SSLEngine sslEngine)
+ public SslConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, SSLEngine sslEngine)
{
- this(retainableByteBufferPool, executor, endPoint, sslEngine, false, false);
+ this(byteBufferPool, executor, endPoint, sslEngine, false, false);
}
- public SslConnection(RetainableByteBufferPool retainableByteBufferPool, Executor executor, EndPoint endPoint, SSLEngine sslEngine,
+ public SslConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, SSLEngine sslEngine,
boolean useDirectBuffersForEncryption, boolean useDirectBuffersForDecryption)
{
// This connection does not execute calls to onFillable(), so they will be called by the selector thread.
// onFillable() does not block and will only wakeup another thread to do the actual reading and handling.
super(endPoint, executor);
- this._retainableByteBufferPool = retainableByteBufferPool;
+ this._retainableByteBufferPool = byteBufferPool;
this._sslEngine = sslEngine;
this._decryptedEndPoint = newDecryptedEndPoint();
this._encryptedDirectBuffers = useDirectBuffersForEncryption;
diff --git a/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ByteBufferAccumulatorTest.java b/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ByteBufferAccumulatorTest.java
index 758c547762a..10a0d0bf966 100644
--- a/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ByteBufferAccumulatorTest.java
+++ b/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ByteBufferAccumulatorTest.java
@@ -292,7 +292,7 @@ public class ByteBufferAccumulatorTest
return written;
}
- private static class CountingBufferPool extends RetainableByteBufferPool.Wrapper
+ private static class CountingBufferPool extends ByteBufferPool.Wrapper
{
private final AtomicLong _acquires = new AtomicLong();
diff --git a/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/SocketChannelEndPointTest.java b/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/SocketChannelEndPointTest.java
index 14231895da1..ee8a9e6ca9e 100644
--- a/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/SocketChannelEndPointTest.java
+++ b/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/SocketChannelEndPointTest.java
@@ -616,7 +616,7 @@ public class SocketChannelEndPointTest
{
private final NormalScenario _normalScenario;
private final SslContextFactory _sslCtxFactory = new SslContextFactory.Server();
- private final RetainableByteBufferPool _bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool _bufferPool = new ArrayRetainableByteBufferPool();
public SslScenario(NormalScenario normalScenario) throws Exception
{
diff --git a/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/SslConnectionTest.java b/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/SslConnectionTest.java
index 6adaff8ac1f..c07c5a45125 100644
--- a/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/SslConnectionTest.java
+++ b/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/SslConnectionTest.java
@@ -61,7 +61,7 @@ public class SslConnectionTest
private static final int TIMEOUT = 1000000;
// TODO: track leaks
- private final RetainableByteBufferPool _bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool _bufferPool = new ArrayRetainableByteBufferPool();
private final SslContextFactory _sslCtxFactory = new SslContextFactory.Server();
protected volatile EndPoint _lastEndp;
private volatile boolean _testFill = true;
diff --git a/jetty-core/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ForwardProxyWithDynamicTransportTest.java b/jetty-core/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ForwardProxyWithDynamicTransportTest.java
index 8108ac1dd3d..6f6a82aab79 100644
--- a/jetty-core/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ForwardProxyWithDynamicTransportTest.java
+++ b/jetty-core/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ForwardProxyWithDynamicTransportTest.java
@@ -403,7 +403,7 @@ public class ForwardProxyWithDynamicTransportTest
@Override
protected DownstreamConnection newDownstreamConnection(EndPoint endPoint, ConcurrentMap context)
{
- return new DownstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), context)
+ return new DownstreamConnection(endPoint, getExecutor(), getByteBufferPool(), context)
{
@Override
protected void close(Throwable failure)
@@ -417,7 +417,7 @@ public class ForwardProxyWithDynamicTransportTest
@Override
protected UpstreamConnection newUpstreamConnection(EndPoint endPoint, ConnectContext connectContext)
{
- return new UpstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), connectContext)
+ return new UpstreamConnection(endPoint, getExecutor(), getByteBufferPool(), connectContext)
{
@Override
protected void close(Throwable failure)
@@ -485,7 +485,7 @@ public class ForwardProxyWithDynamicTransportTest
@Override
protected DownstreamConnection newDownstreamConnection(EndPoint endPoint, ConcurrentMap context)
{
- return new DownstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), context)
+ return new DownstreamConnection(endPoint, getExecutor(), getByteBufferPool(), context)
{
@Override
protected void close(Throwable failure)
@@ -499,7 +499,7 @@ public class ForwardProxyWithDynamicTransportTest
@Override
protected UpstreamConnection newUpstreamConnection(EndPoint endPoint, ConnectContext connectContext)
{
- return new UpstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), connectContext)
+ return new UpstreamConnection(endPoint, getExecutor(), getByteBufferPool(), connectContext)
{
@Override
protected void close(Throwable failure)
diff --git a/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/ClientQuicConnection.java b/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/ClientQuicConnection.java
index a63456cb9c3..c33be6dddc9 100644
--- a/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/ClientQuicConnection.java
+++ b/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/ClientQuicConnection.java
@@ -55,7 +55,7 @@ public class ClientQuicConnection extends QuicConnection
public ClientQuicConnection(ClientConnector connector, EndPoint endPoint, Map context)
{
- super(connector.getExecutor(), connector.getScheduler(), connector.getRetainableByteBufferPool(), endPoint);
+ super(connector.getExecutor(), connector.getScheduler(), connector.getByteBufferPool(), endPoint);
this.connector = connector;
this.context = context;
}
@@ -97,7 +97,7 @@ public class ClientQuicConnection extends QuicConnection
LOG.debug("connecting to {} with protocols {}", remoteAddress, protocols);
QuicheConnection quicheConnection = QuicheConnection.connect(quicheConfig, getEndPoint().getLocalAddress(), remoteAddress);
- ClientQuicSession session = new ClientQuicSession(getExecutor(), getScheduler(), getRetainableByteBufferPool(), quicheConnection, this, remoteAddress, context);
+ ClientQuicSession session = new ClientQuicSession(getExecutor(), getScheduler(), getByteBufferPool(), quicheConnection, this, remoteAddress, context);
pendingSessions.put(remoteAddress, session);
if (LOG.isDebugEnabled())
LOG.debug("created {}", session);
diff --git a/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/ClientQuicSession.java b/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/ClientQuicSession.java
index 102a6ef75ef..80ca5833cbb 100644
--- a/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/ClientQuicSession.java
+++ b/jetty-core/jetty-quic/jetty-quic-client/src/main/java/org/eclipse/jetty/quic/client/ClientQuicSession.java
@@ -19,10 +19,10 @@ import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicReference;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Connection;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.RuntimeIOException;
import org.eclipse.jetty.quic.common.ProtocolSession;
import org.eclipse.jetty.quic.common.QuicConnection;
@@ -43,9 +43,9 @@ public class ClientQuicSession extends QuicSession
private final Map context;
private final AtomicReference task = new AtomicReference<>();
- protected ClientQuicSession(Executor executor, Scheduler scheduler, RetainableByteBufferPool retainableByteBufferPool, QuicheConnection quicheConnection, QuicConnection connection, InetSocketAddress remoteAddress, Map context)
+ protected ClientQuicSession(Executor executor, Scheduler scheduler, ByteBufferPool byteBufferPool, QuicheConnection quicheConnection, QuicConnection connection, InetSocketAddress remoteAddress, Map context)
{
- super(executor, scheduler, retainableByteBufferPool, quicheConnection, connection, remoteAddress);
+ super(executor, scheduler, byteBufferPool, quicheConnection, connection, remoteAddress);
this.context = context;
}
diff --git a/jetty-core/jetty-quic/jetty-quic-common/src/main/java/org/eclipse/jetty/quic/common/QuicConnection.java b/jetty-core/jetty-quic/jetty-quic-common/src/main/java/org/eclipse/jetty/quic/common/QuicConnection.java
index 02ee7e016e1..1001503bb94 100644
--- a/jetty-core/jetty-quic/jetty-quic-common/src/main/java/org/eclipse/jetty/quic/common/QuicConnection.java
+++ b/jetty-core/jetty-quic/jetty-quic-common/src/main/java/org/eclipse/jetty/quic/common/QuicConnection.java
@@ -27,11 +27,11 @@ import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.DatagramChannelEndPoint;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.quic.quiche.QuicheConnectionId;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
@@ -59,7 +59,7 @@ public abstract class QuicConnection extends AbstractConnection
private final ConcurrentMap sessions = new ConcurrentHashMap<>();
private final AtomicBoolean closed = new AtomicBoolean();
private final Scheduler scheduler;
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final AdaptiveExecutionStrategy strategy;
private final Flusher flusher = new Flusher();
private final Callback fillableCallback = new FillableCallback();
@@ -67,7 +67,7 @@ public abstract class QuicConnection extends AbstractConnection
private boolean useInputDirectByteBuffers = true;
private boolean useOutputDirectByteBuffers = true;
- protected QuicConnection(Executor executor, Scheduler scheduler, RetainableByteBufferPool bufferPool, EndPoint endPoint)
+ protected QuicConnection(Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, EndPoint endPoint)
{
super(endPoint, executor);
if (!(endPoint instanceof DatagramChannelEndPoint))
@@ -88,7 +88,7 @@ public abstract class QuicConnection extends AbstractConnection
return scheduler;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
diff --git a/jetty-core/jetty-quic/jetty-quic-common/src/main/java/org/eclipse/jetty/quic/common/QuicSession.java b/jetty-core/jetty-quic/jetty-quic-common/src/main/java/org/eclipse/jetty/quic/common/QuicSession.java
index 1bd47ed6e3e..637242ec3a6 100644
--- a/jetty-core/jetty-quic/jetty-quic-common/src/main/java/org/eclipse/jetty/quic/common/QuicSession.java
+++ b/jetty-core/jetty-quic/jetty-quic-common/src/main/java/org/eclipse/jetty/quic/common/QuicSession.java
@@ -30,11 +30,11 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Consumer;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.CyclicTimeout;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.quic.quiche.QuicheConnection;
import org.eclipse.jetty.quic.quiche.QuicheConnectionId;
import org.eclipse.jetty.util.BufferUtil;
@@ -65,7 +65,7 @@ public abstract class QuicSession extends ContainerLifeCycle
private final ConcurrentMap endPoints = new ConcurrentHashMap<>();
private final Executor executor;
private final Scheduler scheduler;
- private final RetainableByteBufferPool retainableByteBufferPool;
+ private final ByteBufferPool byteBufferPool;
private final QuicheConnection quicheConnection;
private final QuicConnection connection;
private final Flusher flusher;
@@ -74,11 +74,11 @@ public abstract class QuicSession extends ContainerLifeCycle
private QuicheConnectionId quicheConnectionId;
private long idleTimeout;
- protected QuicSession(Executor executor, Scheduler scheduler, RetainableByteBufferPool retainableByteBufferPool, QuicheConnection quicheConnection, QuicConnection connection, SocketAddress remoteAddress)
+ protected QuicSession(Executor executor, Scheduler scheduler, ByteBufferPool byteBufferPool, QuicheConnection quicheConnection, QuicConnection connection, SocketAddress remoteAddress)
{
this.executor = executor;
this.scheduler = scheduler;
- this.retainableByteBufferPool = retainableByteBufferPool;
+ this.byteBufferPool = byteBufferPool;
this.quicheConnection = quicheConnection;
this.connection = connection;
this.flusher = new Flusher(scheduler);
@@ -149,9 +149,9 @@ public abstract class QuicSession extends ContainerLifeCycle
return scheduler;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return retainableByteBufferPool;
+ return byteBufferPool;
}
public ProtocolSession getProtocolSession()
@@ -465,7 +465,7 @@ public abstract class QuicSession extends ContainerLifeCycle
@Override
protected Action process() throws IOException
{
- cipherBuffer = retainableByteBufferPool.acquire(connection.getOutputBufferSize(), connection.isUseOutputDirectByteBuffers());
+ cipherBuffer = byteBufferPool.acquire(connection.getOutputBufferSize(), connection.isUseOutputDirectByteBuffers());
ByteBuffer cipherByteBuffer = cipherBuffer.getByteBuffer();
int pos = BufferUtil.flipToFill(cipherByteBuffer);
int drained = quicheConnection.drainCipherBytes(cipherByteBuffer);
diff --git a/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/QuicServerConnector.java b/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/QuicServerConnector.java
index 5e73e81d46b..0d10efa4afa 100644
--- a/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/QuicServerConnector.java
+++ b/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/QuicServerConnector.java
@@ -26,11 +26,11 @@ import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.DatagramChannelEndPoint;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.ManagedSelector;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.SelectorManager;
import org.eclipse.jetty.quic.common.QuicConfiguration;
import org.eclipse.jetty.quic.common.QuicSession;
@@ -74,7 +74,7 @@ public class QuicServerConnector extends AbstractNetworkConnector
this(server, null, null, null, sslContextFactory, factories);
}
- public QuicServerConnector(Server server, Executor executor, Scheduler scheduler, RetainableByteBufferPool bufferPool, SslContextFactory.Server sslContextFactory, ConnectionFactory... factories)
+ public QuicServerConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, SslContextFactory.Server sslContextFactory, ConnectionFactory... factories)
{
super(server, executor, scheduler, bufferPool, 0, factories);
this.selectorManager = new ServerDatagramSelectorManager(getExecutor(), getScheduler(), 1);
diff --git a/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/ServerQuicConnection.java b/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/ServerQuicConnection.java
index 58d5713d104..310222a126d 100644
--- a/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/ServerQuicConnection.java
+++ b/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/ServerQuicConnection.java
@@ -19,10 +19,10 @@ import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.util.Iterator;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.CyclicTimeouts;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.quic.common.QuicConnection;
import org.eclipse.jetty.quic.common.QuicSession;
import org.eclipse.jetty.quic.quiche.QuicheConnection;
@@ -46,7 +46,7 @@ public class ServerQuicConnection extends QuicConnection
protected ServerQuicConnection(QuicServerConnector connector, EndPoint endPoint)
{
- super(connector.getExecutor(), connector.getScheduler(), connector.getRetainableByteBufferPool(), endPoint);
+ super(connector.getExecutor(), connector.getScheduler(), connector.getByteBufferPool(), endPoint);
this.connector = connector;
this.sessionTimeouts = new SessionTimeouts(connector.getScheduler());
}
@@ -61,7 +61,7 @@ public class ServerQuicConnection extends QuicConnection
@Override
protected QuicSession createSession(SocketAddress remoteAddress, ByteBuffer cipherBuffer) throws IOException
{
- RetainableByteBufferPool bufferPool = getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = getByteBufferPool();
// TODO make the token validator configurable
QuicheConnection quicheConnection = QuicheConnection.tryAccept(connector.newQuicheConfig(), new SimpleTokenValidator((InetSocketAddress)remoteAddress), cipherBuffer, getEndPoint().getLocalAddress(), remoteAddress);
if (quicheConnection == null)
diff --git a/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/ServerQuicSession.java b/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/ServerQuicSession.java
index 55cf5a1645d..021081f2178 100644
--- a/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/ServerQuicSession.java
+++ b/jetty-core/jetty-quic/jetty-quic-server/src/main/java/org/eclipse/jetty/quic/server/ServerQuicSession.java
@@ -20,9 +20,9 @@ import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.CyclicTimeouts;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.RuntimeIOException;
import org.eclipse.jetty.quic.common.ProtocolSession;
import org.eclipse.jetty.quic.common.QuicConnection;
@@ -46,7 +46,7 @@ public class ServerQuicSession extends QuicSession implements CyclicTimeouts.Exp
private final Connector connector;
private long expireNanoTime;
- protected ServerQuicSession(Executor executor, Scheduler scheduler, RetainableByteBufferPool bufferPool, QuicheConnection quicheConnection, QuicConnection connection, SocketAddress remoteAddress, Connector connector)
+ protected ServerQuicSession(Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, QuicheConnection quicheConnection, QuicConnection connection, SocketAddress remoteAddress, Connector connector)
{
super(executor, scheduler, bufferPool, quicheConnection, connection, remoteAddress);
this.connector = connector;
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java
index 75e2fbe7751..bad54a3cab1 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java
@@ -32,9 +32,9 @@ import java.util.concurrent.locks.Condition;
import java.util.stream.Collectors;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.ssl.SslConnection;
import org.eclipse.jetty.server.internal.HttpConnection;
import org.eclipse.jetty.util.ProcessorUtils;
@@ -65,7 +65,7 @@ import org.slf4j.LoggerFactory;
* to the connections to time such things as asynchronous request timeouts. The default is to use a new
* {@link ScheduledExecutorScheduler} instance.
*
- * The {@link RetainableByteBufferPool} service is made available to all connections to be used to acquire and release
+ * The {@link ByteBufferPool} service is made available to all connections to be used to acquire and release
* {@link RetainableByteBuffer} instances from a pool. The default is to use a new {@link ArrayRetainableByteBufferPool}
* instance.
*
@@ -145,7 +145,7 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
private final Server _server;
private final Executor _executor;
private final Scheduler _scheduler;
- private final RetainableByteBufferPool _retainableByteBufferPool;
+ private final ByteBufferPool _retainableByteBufferPool;
private final Thread[] _acceptors;
private final Set _endpoints = Collections.newSetFromMap(new ConcurrentHashMap<>());
private final Set _immutableEndPoints = Collections.unmodifiableSet(_endpoints);
@@ -164,7 +164,7 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
* @param server The {@link Server} this connector will be added to, must not be null
* @param executor An {@link Executor} for this connector or null to use the Server's Executor
* @param scheduler A {@link Scheduler} for this connector or null to use the Server's Scheduler
- * @param bufferPool A {@link RetainableByteBufferPool} for this connector or null to use the Server's RetainableByteBufferPool
+ * @param bufferPool A {@link ByteBufferPool} for this connector or null to use the Server's ByteBufferPool
* @param acceptors the number of acceptor threads to use, or -1 for a default value.
* If 0, then no acceptor threads will be launched and some other mechanism will need to be used to accept new connections.
* @param factories The {@link ConnectionFactory} instances to use
@@ -173,7 +173,7 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
Server server,
Executor executor,
Scheduler scheduler,
- RetainableByteBufferPool bufferPool,
+ ByteBufferPool bufferPool,
int acceptors,
ConnectionFactory... factories)
{
@@ -185,7 +185,7 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
_scheduler = scheduler != null ? scheduler : _server.getScheduler();
addBean(_scheduler, scheduler != null);
- _retainableByteBufferPool = bufferPool != null ? bufferPool : server.getRetainableByteBufferPool();
+ _retainableByteBufferPool = bufferPool != null ? bufferPool : server.getByteBufferPool();
addBean(_retainableByteBufferPool, bufferPool != null);
for (ConnectionFactory factory : factories)
@@ -214,7 +214,7 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return _retainableByteBufferPool;
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractNetworkConnector.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractNetworkConnector.java
index 3435ac7e109..6e0a0bea9b0 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractNetworkConnector.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractNetworkConnector.java
@@ -17,7 +17,7 @@ import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.eclipse.jetty.util.thread.Scheduler;
@@ -33,7 +33,7 @@ public abstract class AbstractNetworkConnector extends AbstractConnector impleme
private volatile String _host;
private volatile int _port = 0;
- public AbstractNetworkConnector(Server server, Executor executor, Scheduler scheduler, RetainableByteBufferPool bufferPool, int acceptors, ConnectionFactory... factories)
+ public AbstractNetworkConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, int acceptors, ConnectionFactory... factories)
{
super(server, executor, scheduler, bufferPool, acceptors, factories);
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Components.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Components.java
index b605f45c533..e3ef0ec52d6 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Components.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Components.java
@@ -13,7 +13,7 @@
package org.eclipse.jetty.server;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Attributes;
import org.eclipse.jetty.util.thread.Scheduler;
import org.eclipse.jetty.util.thread.ThreadPool;
@@ -23,7 +23,7 @@ import org.eclipse.jetty.util.thread.ThreadPool;
*/
public interface Components
{
- RetainableByteBufferPool getRetainableByteBufferPool();
+ ByteBufferPool getByteBufferPool();
Scheduler getScheduler();
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ConnectionMetaData.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ConnectionMetaData.java
index 1fe6c1c44a1..8b7b68d42e5 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ConnectionMetaData.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ConnectionMetaData.java
@@ -38,7 +38,7 @@ public interface ConnectionMetaData extends Attributes
Connection getConnection();
// TODO should this be only here or only on HttpChannel, should not be on both.
- // Currently mostly used to get stuff like RetainableByteBufferPool and Scheduler - maybe provide those directly?
+ // Currently mostly used to get stuff like ByteBufferPool and Scheduler - maybe provide those directly?
Connector getConnector();
boolean isPersistent();
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Connector.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Connector.java
index 59721ff09f7..4f6e72ba719 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Connector.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Connector.java
@@ -17,8 +17,8 @@ import java.util.Collection;
import java.util.List;
import java.util.concurrent.Executor;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
@@ -51,9 +51,9 @@ public interface Connector extends LifeCycle, Container, Graceful
public Scheduler getScheduler();
/**
- * @return the {@link RetainableByteBufferPool} to acquire buffers from and release buffers to
+ * @return the {@link ByteBufferPool} to acquire buffers from and release buffers to
*/
- public RetainableByteBufferPool getRetainableByteBufferPool();
+ public ByteBufferPool getByteBufferPool();
/**
* @param nextProtocol the next protocol
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/DetectorConnectionFactory.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/DetectorConnectionFactory.java
index 5e1a05c1692..0358bf07e16 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/DetectorConnectionFactory.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/DetectorConnectionFactory.java
@@ -146,7 +146,7 @@ public class DetectorConnectionFactory extends AbstractConnectionFactory impleme
{
super(endp, connector.getExecutor());
_connector = connector;
- _buffer = connector.getRetainableByteBufferPool().acquire(getInputBufferSize(), true);
+ _buffer = connector.getByteBufferPool().acquire(getInputBufferSize(), true);
}
@Override
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java
index 61733866f4a..7ed0d98a85a 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java
@@ -26,8 +26,8 @@ import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpParser;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.io.ByteArrayEndPoint;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.ByteArrayOutputStream2;
import org.eclipse.jetty.util.ssl.SslContextFactory;
@@ -46,7 +46,7 @@ public class LocalConnector extends AbstractConnector
{
private final BlockingQueue _connects = new LinkedBlockingQueue<>();
- public LocalConnector(Server server, Executor executor, Scheduler scheduler, RetainableByteBufferPool bufferPool, int acceptors, ConnectionFactory... factories)
+ public LocalConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, int acceptors, ConnectionFactory... factories)
{
super(server, executor, scheduler, bufferPool, acceptors, factories);
setIdleTimeout(30000);
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/NetworkTrafficServerConnector.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/NetworkTrafficServerConnector.java
index fd34d134e55..d7137ab91b2 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/NetworkTrafficServerConnector.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/NetworkTrafficServerConnector.java
@@ -17,10 +17,10 @@ import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel;
import java.util.concurrent.Executor;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ManagedSelector;
import org.eclipse.jetty.io.NetworkTrafficListener;
import org.eclipse.jetty.io.NetworkTrafficSocketChannelEndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.SocketChannelEndPoint;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.util.thread.Scheduler;
@@ -49,7 +49,7 @@ public class NetworkTrafficServerConnector extends ServerConnector
super(server, connectionFactory);
}
- public NetworkTrafficServerConnector(Server server, Executor executor, Scheduler scheduler, RetainableByteBufferPool bufferPool, int acceptors, int selectors, ConnectionFactory... factories)
+ public NetworkTrafficServerConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, int acceptors, int selectors, ConnectionFactory... factories)
{
super(server, executor, scheduler, bufferPool, acceptors, selectors, factories);
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java
index 20d8d8439ed..8a3d8fe712f 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java
@@ -158,7 +158,7 @@ public class ProxyConnectionFactory extends DetectorConnectionFactory
super(endp, connector.getExecutor());
_connector = connector;
_next = next;
- _buffer = _connector.getRetainableByteBufferPool().acquire(getInputBufferSize(), true);
+ _buffer = _connector.getByteBufferPool().acquire(getInputBufferSize(), true);
}
@Override
@@ -451,7 +451,7 @@ public class ProxyConnectionFactory extends DetectorConnectionFactory
super(endp, connector.getExecutor());
_connector = connector;
_next = next;
- _buffer = _connector.getRetainableByteBufferPool().acquire(getInputBufferSize(), true);
+ _buffer = _connector.getByteBufferPool().acquire(getInputBufferSize(), true);
}
@Override
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java
index 10b6cc240f7..a1f2dbb6b8a 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java
@@ -40,9 +40,9 @@ import org.eclipse.jetty.http.QuotedCSV;
import org.eclipse.jetty.http.QuotedQualityCSV;
import org.eclipse.jetty.http.content.HttpContent;
import org.eclipse.jetty.http.content.PreCompressedHttpContent;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
@@ -863,7 +863,7 @@ public class ResourceService
this.source = content.getResource().newReadableByteChannel();
this.sink = target;
this.callback = callback;
- RetainableByteBufferPool bufferPool = target.getRequest().getComponents().getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = target.getRequest().getComponents().getByteBufferPool();
int outputBufferSize = target.getRequest().getConnectionMetaData().getHttpConfiguration().getOutputBufferSize();
boolean useOutputDirectByteBuffers = target.getRequest().getConnectionMetaData().getHttpConfiguration().isUseOutputDirectByteBuffers();
this.buffer = bufferPool.acquire(outputBufferSize, useOutputDirectByteBuffers);
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java
index 89b5b0714d7..e98ea011749 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java
@@ -36,8 +36,8 @@ import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.MimeTypes;
import org.eclipse.jetty.http.PreEncodedHttpField;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.ErrorProcessor;
import org.eclipse.jetty.util.Attributes;
@@ -76,7 +76,7 @@ public class Server extends Handler.Wrapper implements Attributes
private final AttributeContainerMap _attributes = new AttributeContainerMap();
private final ThreadPool _threadPool;
private final Scheduler _scheduler;
- private final RetainableByteBufferPool _bufferPool;
+ private final ByteBufferPool _bufferPool;
private final List _connectors = new CopyOnWriteArrayList<>();
private final Context _serverContext = new ServerContext();
private final AutoLock _dateLock = new AutoLock();
@@ -136,7 +136,7 @@ public class Server extends Handler.Wrapper implements Attributes
this(pool, null, null);
}
- public Server(@Name("threadPool") ThreadPool threadPool, @Name("scheduler") Scheduler scheduler, @Name("bufferPool") RetainableByteBufferPool bufferPool)
+ public Server(@Name("threadPool") ThreadPool threadPool, @Name("scheduler") Scheduler scheduler, @Name("bufferPool") ByteBufferPool bufferPool)
{
_threadPool = threadPool != null ? threadPool : new QueuedThreadPool();
addBean(_threadPool);
@@ -420,7 +420,7 @@ public class Server extends Handler.Wrapper implements Attributes
return _scheduler;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return _bufferPool;
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java
index e7998bec1ed..8d688a74953 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java
@@ -30,10 +30,10 @@ import java.util.EventListener;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicReference;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.ManagedSelector;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.SelectorManager;
import org.eclipse.jetty.io.SocketChannelEndPoint;
import org.eclipse.jetty.util.IO;
@@ -204,7 +204,7 @@ public class ServerConnector extends AbstractNetworkConnector
@Name("server") Server server,
@Name("executor") Executor executor,
@Name("scheduler") Scheduler scheduler,
- @Name("bufferPool") RetainableByteBufferPool bufferPool,
+ @Name("bufferPool") ByteBufferPool bufferPool,
@Name("acceptors") int acceptors,
@Name("selectors") int selectors,
@Name("factories") ConnectionFactory... factories)
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/SslConnectionFactory.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/SslConnectionFactory.java
index 407bacb068e..2e4e0ec6726 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/SslConnectionFactory.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/SslConnectionFactory.java
@@ -21,9 +21,9 @@ import javax.net.ssl.SSLSession;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.ssl.SslConnection;
import org.eclipse.jetty.io.ssl.SslHandshakeListener;
import org.eclipse.jetty.util.annotation.Name;
@@ -166,8 +166,8 @@ public class SslConnectionFactory extends AbstractConnectionFactory implements C
protected SslConnection newSslConnection(Connector connector, EndPoint endPoint, SSLEngine engine)
{
- RetainableByteBufferPool retainableByteBufferPool = connector.getRetainableByteBufferPool();
- return new SslConnection(retainableByteBufferPool, connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption());
+ ByteBufferPool byteBufferPool = connector.getByteBufferPool();
+ return new SslConnection(byteBufferPool, connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption());
}
@Override
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java
index 0f0dd3267fa..9357b1a935f 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java
@@ -21,8 +21,8 @@ import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.MimeTypes;
import org.eclipse.jetty.http.pathmap.PathSpecSet;
import org.eclipse.jetty.io.ByteBufferAccumulator;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.ConnectionMetaData;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Request;
@@ -189,7 +189,7 @@ public class BufferedResponseHandler extends Handler.Wrapper
if (shouldBuffer(this, last))
{
ConnectionMetaData connectionMetaData = getRequest().getConnectionMetaData();
- RetainableByteBufferPool bufferPool = connectionMetaData.getConnector().getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = connectionMetaData.getConnector().getByteBufferPool();
boolean useOutputDirectByteBuffers = connectionMetaData.getHttpConfiguration().isUseOutputDirectByteBuffers();
_accumulator = new CountingByteBufferAccumulator(bufferPool, useOutputDirectByteBuffers, getBufferSize());
}
@@ -267,7 +267,7 @@ public class BufferedResponseHandler extends Handler.Wrapper
private final int _maxSize;
private int _accumulatedCount;
- private CountingByteBufferAccumulator(RetainableByteBufferPool bufferPool, boolean direct, int maxSize)
+ private CountingByteBufferAccumulator(ByteBufferPool bufferPool, boolean direct, int maxSize)
{
if (maxSize <= 0)
throw new IllegalArgumentException("maxSize must be > 0, was: " + maxSize);
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ConnectHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ConnectHandler.java
index a66b69b2c36..7c207e2d583 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ConnectHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ConnectHandler.java
@@ -32,11 +32,11 @@ import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpURI;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.ManagedSelector;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.SelectorManager;
import org.eclipse.jetty.io.SocketChannelEndPoint;
import org.eclipse.jetty.server.Handler;
@@ -63,7 +63,7 @@ public class ConnectHandler extends Handler.Wrapper
private final Set blackList = new HashSet<>();
private Executor executor;
private Scheduler scheduler;
- private RetainableByteBufferPool bufferPool;
+ private ByteBufferPool bufferPool;
private SelectorManager selector;
private long connectTimeout = 15000;
private long idleTimeout = 30000;
@@ -100,12 +100,12 @@ public class ConnectHandler extends Handler.Wrapper
this.scheduler = scheduler;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
- public void setRetainableByteBufferPool(RetainableByteBufferPool bufferPool)
+ public void setByteBufferPool(ByteBufferPool bufferPool)
{
updateBean(this.bufferPool, bufferPool);
this.bufferPool = bufferPool;
@@ -167,7 +167,7 @@ public class ConnectHandler extends Handler.Wrapper
if (bufferPool == null)
{
- bufferPool = getServer().getRetainableByteBufferPool();
+ bufferPool = getServer().getByteBufferPool();
addBean(bufferPool);
}
@@ -382,12 +382,12 @@ public class ConnectHandler extends Handler.Wrapper
protected DownstreamConnection newDownstreamConnection(EndPoint endPoint, ConcurrentMap context)
{
- return new DownstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), context);
+ return new DownstreamConnection(endPoint, getExecutor(), getByteBufferPool(), context);
}
protected UpstreamConnection newUpstreamConnection(EndPoint endPoint, ConnectContext connectContext)
{
- return new UpstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), connectContext);
+ return new UpstreamConnection(endPoint, getExecutor(), getByteBufferPool(), connectContext);
}
protected void prepareContext(Request request, ConcurrentMap context)
@@ -553,7 +553,7 @@ public class ConnectHandler extends Handler.Wrapper
{
private final ConnectContext connectContext;
- public UpstreamConnection(EndPoint endPoint, Executor executor, RetainableByteBufferPool bufferPool, ConnectContext connectContext)
+ public UpstreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, ConnectContext connectContext)
{
super(endPoint, executor, bufferPool, connectContext.getContext());
this.connectContext = connectContext;
@@ -589,7 +589,7 @@ public class ConnectHandler extends Handler.Wrapper
{
private ByteBuffer buffer;
- public DownstreamConnection(EndPoint endPoint, Executor executor, RetainableByteBufferPool bufferPool, ConcurrentMap context)
+ public DownstreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, ConcurrentMap context)
{
super(endPoint, executor, bufferPool, context);
}
@@ -656,18 +656,18 @@ public class ConnectHandler extends Handler.Wrapper
private abstract static class TunnelConnection extends AbstractConnection
{
private final IteratingCallback pipe = new ProxyIteratingCallback();
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final ConcurrentMap context;
private TunnelConnection connection;
- protected TunnelConnection(EndPoint endPoint, Executor executor, RetainableByteBufferPool bufferPool, ConcurrentMap context)
+ protected TunnelConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, ConcurrentMap context)
{
super(endPoint, executor);
this.bufferPool = bufferPool;
this.context = context;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorProcessor.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorProcessor.java
index 97aba33ae59..ad72cc0d63c 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorProcessor.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorProcessor.java
@@ -203,7 +203,7 @@ public class ErrorProcessor implements Request.Processor
int bufferSize = request.getConnectionMetaData().getHttpConfiguration().getOutputBufferSize();
bufferSize = Math.min(8192, bufferSize); // TODO ?
- RetainableByteBuffer buffer = request.getComponents().getRetainableByteBufferPool().acquire(bufferSize, false);
+ RetainableByteBuffer buffer = request.getComponents().getByteBufferPool().acquire(bufferSize, false);
try
{
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
index ba84e11e175..472d092b6e1 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
@@ -25,7 +25,7 @@ import org.eclipse.jetty.http.content.PreCompressedHttpContentFactory;
import org.eclipse.jetty.http.content.ResourceHttpContentFactory;
import org.eclipse.jetty.http.content.ValidatingCachingHttpContentFactory;
import org.eclipse.jetty.http.content.VirtualHttpContentFactory;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.Context;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Request;
@@ -57,7 +57,7 @@ public class ResourceHandler extends Handler.Wrapper
{
private final ResourceService _resourceService;
- private RetainableByteBufferPool _bufferPool;
+ private ByteBufferPool _bufferPool;
private Resource _resourceBase;
private Resource _styleSheet;
private MimeTypes _mimeTypes;
@@ -80,21 +80,21 @@ public class ResourceHandler extends Handler.Wrapper
_mimeTypes = context == null ? MimeTypes.DEFAULTS : context.getMimeTypes();
- _bufferPool = getRetainableByteBufferPool(context);
+ _bufferPool = getByteBufferPool(context);
_resourceService.setHttpContentFactory(newHttpContentFactory());
_resourceService.setWelcomeFactory(setupWelcomeFactory());
super.doStart();
}
- private RetainableByteBufferPool getRetainableByteBufferPool(Context context)
+ private ByteBufferPool getByteBufferPool(Context context)
{
if (context == null)
- return new RetainableByteBufferPool.NonPooling();
+ return new ByteBufferPool.NonPooling();
Server server = getServer();
if (server == null)
- return new RetainableByteBufferPool.NonPooling();
- return server.getRetainableByteBufferPool();
+ return new ByteBufferPool.NonPooling();
+ return server.getByteBufferPool();
}
public HttpContent.Factory getHttpContentFactory()
@@ -108,7 +108,7 @@ public class ResourceHandler extends Handler.Wrapper
contentFactory = new FileMappingHttpContentFactory(contentFactory);
contentFactory = new VirtualHttpContentFactory(contentFactory, getStyleSheet(), "text/css");
contentFactory = new PreCompressedHttpContentFactory(contentFactory, getPrecompressedFormats());
- contentFactory = new ValidatingCachingHttpContentFactory(contentFactory, Duration.ofSeconds(1).toMillis(), getRetainableByteBufferPool());
+ contentFactory = new ValidatingCachingHttpContentFactory(contentFactory, Duration.ofSeconds(1).toMillis(), getByteBufferPool());
return contentFactory;
}
@@ -159,7 +159,7 @@ public class ResourceHandler extends Handler.Wrapper
return _resourceBase;
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return _bufferPool;
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipRequest.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipRequest.java
index fecb4e308d9..2915aa2cb8b 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipRequest.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipRequest.java
@@ -22,9 +22,9 @@ import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.PreEncodedHttpField;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.content.ContentSourceTransformer;
import org.eclipse.jetty.server.Components;
import org.eclipse.jetty.server.Request;
@@ -50,7 +50,7 @@ public class GzipRequest extends Request.Wrapper
if (inflateBufferSize > 0)
{
Components components = getComponents();
- _decoder = new Decoder(__inflaterPool, components.getRetainableByteBufferPool(), inflateBufferSize);
+ _decoder = new Decoder(__inflaterPool, components.getByteBufferPool(), inflateBufferSize);
_gzipTransformer = new GzipTransformer(getWrapped());
}
}
@@ -192,7 +192,7 @@ public class GzipRequest extends Request.Wrapper
{
private RetainableByteBuffer _decoded;
- private Decoder(InflaterPool inflaterPool, RetainableByteBufferPool bufferPool, int bufferSize)
+ private Decoder(InflaterPool inflaterPool, ByteBufferPool bufferPool, int bufferSize)
{
super(inflaterPool, bufferPool, bufferSize);
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipResponseAndCallback.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipResponseAndCallback.java
index 7eb03b43e6d..5ac6603d706 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipResponseAndCallback.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipResponseAndCallback.java
@@ -341,7 +341,7 @@ public class GzipResponseAndCallback extends Response.Wrapper implements Callbac
// If we have no buffer
if (_buffer == null)
{
- _buffer = getRequest().getComponents().getRetainableByteBufferPool().acquire(_bufferSize, false);
+ _buffer = getRequest().getComponents().getByteBufferPool().acquire(_bufferSize, false);
ByteBuffer byteBuffer = _buffer.getByteBuffer();
// Per RFC-1952, GZIP is LITTLE_ENDIAN
byteBuffer.order(ByteOrder.LITTLE_ENDIAN);
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java
index 9779afe28cb..05aad2237c4 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java
@@ -37,10 +37,10 @@ import org.eclipse.jetty.http.MetaData;
import org.eclipse.jetty.http.PreEncodedHttpField;
import org.eclipse.jetty.http.Trailers;
import org.eclipse.jetty.http.UriCompliance;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.Components;
import org.eclipse.jetty.server.ConnectionMetaData;
import org.eclipse.jetty.server.Connector;
@@ -221,9 +221,9 @@ public class HttpChannelState implements HttpChannel, Components
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return getConnectionMetaData().getConnector().getRetainableByteBufferPool();
+ return getConnectionMetaData().getConnector().getByteBufferPool();
}
@Override
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java
index c5f3a5bba86..66a1220e86f 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java
@@ -46,12 +46,12 @@ import org.eclipse.jetty.http.MetaData;
import org.eclipse.jetty.http.Trailers;
import org.eclipse.jetty.http.UriCompliance;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.EofException;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.WriteFlusher;
import org.eclipse.jetty.io.ssl.SslConnection;
import org.eclipse.jetty.server.ConnectionFactory;
@@ -95,7 +95,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Writ
private final RequestHandler _requestHandler;
private final HttpParser _parser;
private final HttpGenerator _generator;
- private final RetainableByteBufferPool _retainableByteBufferPool;
+ private final ByteBufferPool _retainableByteBufferPool;
private final AtomicReference _stream = new AtomicReference<>();
private final Lazy _attributes = new Lazy();
private final DemandContentCallback _demandContentCallback = new DemandContentCallback();
@@ -139,7 +139,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Writ
_id = __connectionIdGenerator.getAndIncrement();
_configuration = configuration;
_connector = connector;
- _retainableByteBufferPool = _connector.getRetainableByteBufferPool();
+ _retainableByteBufferPool = _connector.getByteBufferPool();
_generator = newHttpGenerator();
_httpChannel = newHttpChannel(connector.getServer(), configuration);
_requestHandler = newRequestHandler();
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java
index 706b07077ca..2ee4ed232eb 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java
@@ -38,10 +38,10 @@ import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpTester;
import org.eclipse.jetty.io.AbstractConnection;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.logging.StacklessLogging;
import org.eclipse.jetty.server.handler.EchoHandler;
import org.eclipse.jetty.server.handler.HelloHandler;
@@ -1766,7 +1766,7 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
long total = contents.stream().mapToLong(Content.Chunk::remaining).sum();
assertThat(total, equalTo(chunk.length * 4L));
- RetainableByteBufferPool rbbp = _connector.getRetainableByteBufferPool();
+ ByteBufferPool rbbp = _connector.getByteBufferPool();
if (rbbp instanceof ArrayRetainableByteBufferPool pool)
{
long buffersBeforeRelease = pool.getAvailableDirectByteBufferCount() + pool.getAvailableHeapByteBufferCount();
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/MockConnector.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/MockConnector.java
index 82134dd418d..03ea64296e8 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/MockConnector.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/MockConnector.java
@@ -15,13 +15,13 @@ package org.eclipse.jetty.server;
import java.io.IOException;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
public class MockConnector extends AbstractConnector
{
public MockConnector(Server server)
{
- super(server, server.getThreadPool(), server.getScheduler(), new RetainableByteBufferPool.NonPooling(), 0);
+ super(server, server.getThreadPool(), server.getScheduler(), new ByteBufferPool.NonPooling(), 0);
}
@Override
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ThreadStarvationTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ThreadStarvationTest.java
index faf34e7da80..23a54bdfaf0 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ThreadStarvationTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ThreadStarvationTest.java
@@ -32,7 +32,7 @@ import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.IO;
@@ -85,7 +85,7 @@ public class ThreadStarvationTest
sslContextFactory.setKeyStorePassword("storepwd");
// TODO: restore leak tracking.
// ByteBufferPool pool = new LeakTrackingByteBufferPool(new MappedByteBufferPool.Tagged());
- RetainableByteBufferPool pool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool pool = new ArrayRetainableByteBufferPool();
HttpConnectionFactory httpConnectionFactory = new HttpConnectionFactory();
ServerConnector connector = new ServerConnector(server, null, null, pool, acceptors, selectors,
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DebugHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DebugHandlerTest.java
index 85ba710e331..510a5aa5c9f 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DebugHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DebugHandlerTest.java
@@ -27,7 +27,7 @@ import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.AbstractConnectionFactory;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.Server;
@@ -72,7 +72,7 @@ public class DebugHandlerTest
sslContextFactory.setKeyStorePassword("storepwd");
// TODO: restore leak tracking.
// ByteBufferPool pool = new LeakTrackingByteBufferPool(new MappedByteBufferPool.Tagged());
- RetainableByteBufferPool pool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool pool = new ArrayRetainableByteBufferPool();
ServerConnector sslConnector = new ServerConnector(server, null, null, pool, 1, 1,
AbstractConnectionFactory.getFactories(sslContextFactory, new HttpConnectionFactory()));
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ResourceHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ResourceHandlerTest.java
index 6c8a49e6dd9..6a8f2aac41f 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ResourceHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ResourceHandlerTest.java
@@ -670,7 +670,7 @@ public class ResourceHandlerTest
contentFactory = new FileMappingHttpContentFactory(contentFactory);
contentFactory = new VirtualHttpContentFactory(contentFactory, getStyleSheet(), "text/css");
contentFactory = new PreCompressedHttpContentFactory(contentFactory, getPrecompressedFormats());
- contentFactory = new ValidatingCachingHttpContentFactory(contentFactory, 0, getRetainableByteBufferPool());
+ contentFactory = new ValidatingCachingHttpContentFactory(contentFactory, 0, getByteBufferPool());
return contentFactory;
}
};
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java
index 9690f293b68..757bd6760e3 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java
@@ -203,7 +203,7 @@ public class SSLEngineTest
@Override
protected SslConnection newSslConnection(Connector connector, EndPoint endPoint, SSLEngine engine)
{
- return new SslConnection(connector.getRetainableByteBufferPool(), connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
+ return new SslConnection(connector.getByteBufferPool(), connector.getExecutor(), endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption())
{
@Override
protected SSLEngineResult unwrap(SSLEngine sslEngine, ByteBuffer input, ByteBuffer output) throws SSLException
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/ServerConnectorSslServerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/ServerConnectorSslServerTest.java
index aff49dfb563..9bfc7c12b1d 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/ServerConnectorSslServerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/ServerConnectorSslServerTest.java
@@ -28,8 +28,8 @@ import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManagerFactory;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.AbstractConnectionFactory;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConnectionFactory;
@@ -75,7 +75,7 @@ public class ServerConnectorSslServerTest extends HttpServerTestBase
sslContextFactory.setKeyStorePassword("storepwd");
// TODO: restore leak tracking.
// ByteBufferPool pool = new LeakTrackingByteBufferPool(new MappedByteBufferPool.Tagged());
- RetainableByteBufferPool pool = new ArrayRetainableByteBufferPool();
+ ByteBufferPool pool = new ArrayRetainableByteBufferPool();
HttpConnectionFactory httpConnectionFactory = new HttpConnectionFactory();
ServerConnector connector = new ServerConnector(_server, null, null, pool, 1, 1, AbstractConnectionFactory.getFactories(sslContextFactory, httpConnectionFactory));
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ForwardProxyWithDynamicTransportTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ForwardProxyWithDynamicTransportTest.java
index 5d30ae9c403..0105801ad25 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ForwardProxyWithDynamicTransportTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ForwardProxyWithDynamicTransportTest.java
@@ -411,7 +411,7 @@ public class ForwardProxyWithDynamicTransportTest
@Override
protected DownstreamConnection newDownstreamConnection(EndPoint endPoint, ConcurrentMap context)
{
- return new DownstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), context)
+ return new DownstreamConnection(endPoint, getExecutor(), getByteBufferPool(), context)
{
@Override
protected void close(Throwable failure)
@@ -425,7 +425,7 @@ public class ForwardProxyWithDynamicTransportTest
@Override
protected UpstreamConnection newUpstreamConnection(EndPoint endPoint, ConnectContext connectContext)
{
- return new UpstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), connectContext)
+ return new UpstreamConnection(endPoint, getExecutor(), getByteBufferPool(), connectContext)
{
@Override
protected void close(Throwable failure)
@@ -494,7 +494,7 @@ public class ForwardProxyWithDynamicTransportTest
@Override
protected DownstreamConnection newDownstreamConnection(EndPoint endPoint, ConcurrentMap context)
{
- return new DownstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), context)
+ return new DownstreamConnection(endPoint, getExecutor(), getByteBufferPool(), context)
{
@Override
protected void close(Throwable failure)
@@ -508,7 +508,7 @@ public class ForwardProxyWithDynamicTransportTest
@Override
protected UpstreamConnection newUpstreamConnection(EndPoint endPoint, ConnectContext connectContext)
{
- return new UpstreamConnection(endPoint, getExecutor(), getRetainableByteBufferPool(), connectContext)
+ return new UpstreamConnection(endPoint, getExecutor(), getByteBufferPool(), connectContext)
{
@Override
protected void close(Throwable failure)
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientDemandTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientDemandTest.java
index d03171b4af6..d02f661b0d2 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientDemandTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientDemandTest.java
@@ -140,7 +140,7 @@ public class HttpClientDemandTest extends AbstractTest
});
startClient(transport);
client.stop();
- client.setRetainableByteBufferPool(new ArrayRetainableByteBufferPool(0, bufferSize, -1));
+ client.setByteBufferPool(new ArrayRetainableByteBufferPool(0, bufferSize, -1));
client.setResponseBufferSize(bufferSize);
client.start();
@@ -322,7 +322,7 @@ public class HttpClientDemandTest extends AbstractTest
});
startClient(transport);
client.stop();
- client.setRetainableByteBufferPool(new ArrayRetainableByteBufferPool(0, bufferSize, -1));
+ client.setByteBufferPool(new ArrayRetainableByteBufferPool(0, bufferSize, -1));
client.setResponseBufferSize(bufferSize);
client.start();
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientLoadTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientLoadTest.java
index 6c079f2014e..6fbc196f92a 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientLoadTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientLoadTest.java
@@ -68,7 +68,7 @@ public class HttpClientLoadTest extends AbstractTest
setStreamIdleTimeout(120000);
client.stop();
// TODO: restore leak tracking.
- client.setRetainableByteBufferPool(new ArrayRetainableByteBufferPool());
+ client.setByteBufferPool(new ArrayRetainableByteBufferPool());
client.setMaxConnectionsPerDestination(32768);
client.setMaxRequestsQueuedPerDestination(1024 * 1024);
client.setIdleTimeout(120000);
@@ -118,7 +118,7 @@ public class HttpClientLoadTest extends AbstractTest
start(transport, new LoadHandler());
client.stop();
// TODO: restore leak tracking.
- client.setRetainableByteBufferPool(new ArrayRetainableByteBufferPool());
+ client.setByteBufferPool(new ArrayRetainableByteBufferPool());
client.setMaxConnectionsPerDestination(32768);
client.setMaxRequestsQueuedPerDestination(1024 * 1024);
client.start();
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTimeoutTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTimeoutTest.java
index f8461a52f26..7b55d8310dc 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTimeoutTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTimeoutTest.java
@@ -35,10 +35,10 @@ import org.eclipse.jetty.client.Request;
import org.eclipse.jetty.client.Response;
import org.eclipse.jetty.client.Result;
import org.eclipse.jetty.http.HttpStatus;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;
import org.eclipse.jetty.io.ssl.SslConnection;
import org.eclipse.jetty.server.Handler;
@@ -238,10 +238,10 @@ public class HttpClientTimeoutTest extends AbstractTest
{
if (sslContextFactory == null)
sslContextFactory = getSslContextFactory();
- return new SslClientConnectionFactory(sslContextFactory, getRetainableByteBufferPool(), getExecutor(), connectionFactory)
+ return new SslClientConnectionFactory(sslContextFactory, getByteBufferPool(), getExecutor(), connectionFactory)
{
@Override
- protected SslConnection newSslConnection(RetainableByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
+ protected SslConnection newSslConnection(ByteBufferPool bufferPool, Executor executor, EndPoint endPoint, SSLEngine engine)
{
return new SslConnection(bufferPool, executor, endPoint, engine)
{
diff --git a/jetty-core/jetty-unixdomain-server/src/main/java/org/eclipse/jetty/unixdomain/server/UnixDomainServerConnector.java b/jetty-core/jetty-unixdomain-server/src/main/java/org/eclipse/jetty/unixdomain/server/UnixDomainServerConnector.java
index b29dade57a0..8ec741d8db1 100644
--- a/jetty-core/jetty-unixdomain-server/src/main/java/org/eclipse/jetty/unixdomain/server/UnixDomainServerConnector.java
+++ b/jetty-core/jetty-unixdomain-server/src/main/java/org/eclipse/jetty/unixdomain/server/UnixDomainServerConnector.java
@@ -29,10 +29,10 @@ import java.nio.file.Path;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicReference;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.ManagedSelector;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.SelectorManager;
import org.eclipse.jetty.io.SocketChannelEndPoint;
import org.eclipse.jetty.server.AbstractConnector;
@@ -78,7 +78,7 @@ public class UnixDomainServerConnector extends AbstractConnector
this(server, null, null, null, acceptors, selectors, factories);
}
- public UnixDomainServerConnector(Server server, Executor executor, Scheduler scheduler, RetainableByteBufferPool bufferPool, int acceptors, int selectors, ConnectionFactory... factories)
+ public UnixDomainServerConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, int acceptors, int selectors, ConnectionFactory... factories)
{
super(server, executor, scheduler, bufferPool, acceptors, factories.length > 0 ? factories : new ConnectionFactory[]{new HttpConnectionFactory()});
selectorManager = newSelectorManager(getExecutor(), getScheduler(), selectors);
diff --git a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java
index 7502e987b5b..dcd32bfeb97 100644
--- a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java
+++ b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java
@@ -40,7 +40,6 @@ import static java.util.concurrent.TimeUnit.NANOSECONDS;
import static org.eclipse.jetty.util.AtomicBiInteger.getHi;
import static org.eclipse.jetty.util.AtomicBiInteger.getLo;
-
/**
* A TryExecutor using pre-allocated/reserved threads from an external Executor.
* Calls to {@link #tryExecute(Runnable)} on ReservedThreadExecutor will either
@@ -440,4 +439,4 @@ public class ReservedThreadExecutor extends AbstractLifeCycle implements TryExec
_thread);
}
}
-}
\ No newline at end of file
+}
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-client/src/main/java/org/eclipse/jetty/websocket/core/client/CoreClientUpgradeRequest.java b/jetty-core/jetty-websocket/jetty-websocket-core-client/src/main/java/org/eclipse/jetty/websocket/core/client/CoreClientUpgradeRequest.java
index b91222f4f78..e53481e36e7 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-client/src/main/java/org/eclipse/jetty/websocket/core/client/CoreClientUpgradeRequest.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-client/src/main/java/org/eclipse/jetty/websocket/core/client/CoreClientUpgradeRequest.java
@@ -37,8 +37,8 @@ import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersion;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.ExceptionUtil;
import org.eclipse.jetty.util.QuotedStringTokenizer;
@@ -477,7 +477,7 @@ public abstract class CoreClientUpgradeRequest implements Response.CompleteListe
customizer.customize(coreSession);
HttpClient httpClient = wsClient.getHttpClient();
- RetainableByteBufferPool bufferPool = wsClient.getWebSocketComponents().getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = wsClient.getWebSocketComponents().getByteBufferPool();
WebSocketConnection wsConnection = new WebSocketConnection(endPoint, httpClient.getExecutor(), httpClient.getScheduler(), bufferPool, coreSession);
wsClient.getEventListeners().forEach(wsConnection::addEventListener);
coreSession.setWebSocketConnection(wsConnection);
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/AbstractExtension.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/AbstractExtension.java
index c9697965d12..1bc75708dcc 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/AbstractExtension.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/AbstractExtension.java
@@ -13,7 +13,7 @@
package org.eclipse.jetty.websocket.core;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
@@ -27,7 +27,7 @@ public class AbstractExtension implements Extension
{
private final Logger log;
private CoreSession coreSession;
- private RetainableByteBufferPool bufferPool;
+ private ByteBufferPool bufferPool;
private ExtensionConfig config;
private OutgoingFrames nextOutgoing;
private IncomingFrames nextIncoming;
@@ -43,7 +43,7 @@ public class AbstractExtension implements Extension
public void init(ExtensionConfig config, WebSocketComponents components)
{
this.config = config;
- this.bufferPool = components.getRetainableByteBufferPool();
+ this.bufferPool = components.getByteBufferPool();
this.deflaterPool = components.getDeflaterPool();
this.inflaterPool = components.getInflaterPool();
}
@@ -60,7 +60,7 @@ public class AbstractExtension implements Extension
nextOutgoingFrame(frame, callback, batch);
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/CoreSession.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/CoreSession.java
index 37f72f2dedc..0fb82bef2ea 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/CoreSession.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/CoreSession.java
@@ -19,7 +19,7 @@ import java.net.URI;
import java.util.List;
import java.util.Map;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
/**
@@ -82,9 +82,9 @@ public interface CoreSession extends OutgoingFrames, Configuration
WebSocketComponents getWebSocketComponents();
/**
- * @return The shared RetainableByteBufferPool
+ * @return The shared ByteBufferPool
*/
- RetainableByteBufferPool getRetainableByteBufferPool();
+ ByteBufferPool getByteBufferPool();
/**
* The Local Socket Address for the connection
@@ -241,7 +241,7 @@ public interface CoreSession extends OutgoingFrames, Configuration
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return null;
}
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/WebSocketComponents.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/WebSocketComponents.java
index d32f59a7d6b..b1ec7823a79 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/WebSocketComponents.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/WebSocketComponents.java
@@ -17,7 +17,7 @@ import java.util.concurrent.Executor;
import java.util.zip.Deflater;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.DecoratedObjectFactory;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
import org.eclipse.jetty.util.compression.CompressionPool;
@@ -27,14 +27,14 @@ import org.eclipse.jetty.util.thread.QueuedThreadPool;
/**
* A collection of components which are the resources needed for websockets such as
- * {@link RetainableByteBufferPool}, {@link WebSocketExtensionRegistry}, and {@link DecoratedObjectFactory}.
+ * {@link ByteBufferPool}, {@link WebSocketExtensionRegistry}, and {@link DecoratedObjectFactory}.
*/
public class WebSocketComponents extends ContainerLifeCycle
{
private final DecoratedObjectFactory _objectFactory;
private final WebSocketExtensionRegistry _extensionRegistry;
private final Executor _executor;
- private final RetainableByteBufferPool _bufferPool;
+ private final ByteBufferPool _bufferPool;
private final InflaterPool _inflaterPool;
private final DeflaterPool _deflaterPool;
@@ -44,13 +44,13 @@ public class WebSocketComponents extends ContainerLifeCycle
}
public WebSocketComponents(WebSocketExtensionRegistry extensionRegistry, DecoratedObjectFactory objectFactory,
- RetainableByteBufferPool bufferPool, InflaterPool inflaterPool, DeflaterPool deflaterPool)
+ ByteBufferPool bufferPool, InflaterPool inflaterPool, DeflaterPool deflaterPool)
{
this (extensionRegistry, objectFactory, bufferPool, inflaterPool, deflaterPool, null);
}
public WebSocketComponents(WebSocketExtensionRegistry extensionRegistry, DecoratedObjectFactory objectFactory,
- RetainableByteBufferPool bufferPool, InflaterPool inflaterPool, DeflaterPool deflaterPool, Executor executor)
+ ByteBufferPool bufferPool, InflaterPool inflaterPool, DeflaterPool deflaterPool, Executor executor)
{
_extensionRegistry = (extensionRegistry == null) ? new WebSocketExtensionRegistry() : extensionRegistry;
_objectFactory = (objectFactory == null) ? new DecoratedObjectFactory() : objectFactory;
@@ -77,7 +77,7 @@ public class WebSocketComponents extends ContainerLifeCycle
addBean(_executor);
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return _bufferPool;
}
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/FrameCaptureExtension.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/FrameCaptureExtension.java
index f91ec562258..8ef51830e5a 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/FrameCaptureExtension.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/FrameCaptureExtension.java
@@ -106,7 +106,7 @@ public class FrameCaptureExtension extends AbstractExtension
return;
}
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(BUFSIZE, false);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(BUFSIZE, false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
try
{
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/FrameFlusher.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/FrameFlusher.java
index 4c63f0853af..c5af18aba97 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/FrameFlusher.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/FrameFlusher.java
@@ -24,9 +24,9 @@ import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.LongAdder;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.IteratingCallback;
@@ -51,7 +51,7 @@ public class FrameFlusher extends IteratingCallback
private final AutoLock lock = new AutoLock();
private final LongAdder messagesOut = new LongAdder();
private final LongAdder bytesOut = new LongAdder();
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final EndPoint endPoint;
private final int bufferSize;
private final Generator generator;
@@ -71,7 +71,7 @@ public class FrameFlusher extends IteratingCallback
private long idleTimeout;
private boolean useDirectByteBuffers;
- public FrameFlusher(RetainableByteBufferPool bufferPool, Scheduler scheduler, Generator generator, EndPoint endPoint, int bufferSize, int maxGather)
+ public FrameFlusher(ByteBufferPool bufferPool, Scheduler scheduler, Generator generator, EndPoint endPoint, int bufferSize, int maxGather)
{
this.bufferPool = bufferPool;
this.endPoint = endPoint;
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/Parser.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/Parser.java
index a1654ff7c84..4b30f4af679 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/Parser.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/Parser.java
@@ -16,8 +16,8 @@ package org.eclipse.jetty.websocket.core.internal;
import java.io.Closeable;
import java.nio.ByteBuffer;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.websocket.core.CloseStatus;
@@ -48,7 +48,7 @@ public class Parser
private static final Logger LOG = LoggerFactory.getLogger(Parser.class);
- private final RetainableByteBufferPool bufferPool;
+ private final ByteBufferPool bufferPool;
private final Configuration configuration;
// State specific
@@ -59,12 +59,12 @@ public class Parser
private int payloadLength;
private RetainableByteBuffer aggregate;
- public Parser(RetainableByteBufferPool bufferPool)
+ public Parser(ByteBufferPool bufferPool)
{
this(bufferPool, new Configuration.ConfigurationCustomizer());
}
- public Parser(RetainableByteBufferPool bufferPool, Configuration configuration)
+ public Parser(ByteBufferPool bufferPool, Configuration configuration)
{
this.bufferPool = bufferPool;
this.configuration = configuration;
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/PerMessageDeflateExtension.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/PerMessageDeflateExtension.java
index c175ea4b668..7628aabe153 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/PerMessageDeflateExtension.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/PerMessageDeflateExtension.java
@@ -298,7 +298,7 @@ public class PerMessageDeflateExtension extends AbstractExtension implements Dem
// Get a buffer for the deflated payload.
long maxFrameSize = getConfiguration().getMaxFrameSize();
int bufferSize = (maxFrameSize <= 0) ? deflateBufferSize : (int)Math.min(maxFrameSize, deflateBufferSize);
- RetainableByteBuffer buffer = getRetainableByteBufferPool().acquire(bufferSize, false);
+ RetainableByteBuffer buffer = getByteBufferPool().acquire(bufferSize, false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
callback = Callback.from(callback, buffer::release);
buffer.clear();
@@ -425,7 +425,7 @@ public class PerMessageDeflateExtension extends AbstractExtension implements Dem
// Get a buffer for the inflated payload.
long maxFrameSize = getConfiguration().getMaxFrameSize();
int bufferSize = (maxFrameSize <= 0) ? inflateBufferSize : (int)Math.min(maxFrameSize, inflateBufferSize);
- RetainableByteBuffer payload = getRetainableByteBufferPool().acquire(bufferSize, false);
+ RetainableByteBuffer payload = getByteBufferPool().acquire(bufferSize, false);
_payloadRef = new AtomicReference<>(payload);
ByteBuffer byteBuffer = payload.getByteBuffer();
payload.clear();
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketConnection.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketConnection.java
index 896142046d6..a7b25cfd7b2 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketConnection.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketConnection.java
@@ -24,10 +24,10 @@ import java.util.concurrent.Executor;
import java.util.concurrent.atomic.LongAdder;
import org.eclipse.jetty.io.AbstractConnection;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.MathUtils;
@@ -53,7 +53,7 @@ public class WebSocketConnection extends AbstractConnection implements Connectio
private static final int MIN_BUFFER_SIZE = Generator.MAX_HEADER_LENGTH;
private final AutoLock lock = new AutoLock();
- private final RetainableByteBufferPool retainableByteBufferPool;
+ private final ByteBufferPool byteBufferPool;
private final Generator generator;
private final Parser parser;
private final WebSocketCoreSession coreSession;
@@ -78,10 +78,10 @@ public class WebSocketConnection extends AbstractConnection implements Connectio
public WebSocketConnection(EndPoint endp,
Executor executor,
Scheduler scheduler,
- RetainableByteBufferPool retainableByteBufferPool,
+ ByteBufferPool byteBufferPool,
WebSocketCoreSession coreSession)
{
- this(endp, executor, scheduler, retainableByteBufferPool, coreSession, null);
+ this(endp, executor, scheduler, byteBufferPool, coreSession, null);
}
/**
@@ -93,14 +93,14 @@ public class WebSocketConnection extends AbstractConnection implements Connectio
* @param endp The endpoint ever which Websockot is sent/received
* @param executor A thread executor to use for WS callbacks.
* @param scheduler A scheduler to use for timeouts
- * @param retainableByteBufferPool A pool of retainable buffers to use.
+ * @param byteBufferPool A pool of retainable buffers to use.
* @param coreSession The WC core session to which frames are delivered.
* @param randomMask A Random used to mask frames. If null then SecureRandom will be created if needed.
*/
public WebSocketConnection(EndPoint endp,
Executor executor,
Scheduler scheduler,
- RetainableByteBufferPool retainableByteBufferPool,
+ ByteBufferPool byteBufferPool,
WebSocketCoreSession coreSession,
Random randomMask)
{
@@ -109,12 +109,12 @@ public class WebSocketConnection extends AbstractConnection implements Connectio
Objects.requireNonNull(endp, "EndPoint");
Objects.requireNonNull(coreSession, "Session");
Objects.requireNonNull(executor, "Executor");
- Objects.requireNonNull(retainableByteBufferPool, "RetainableByteBufferPool");
+ Objects.requireNonNull(byteBufferPool, "ByteBufferPool");
- this.retainableByteBufferPool = retainableByteBufferPool;
+ this.byteBufferPool = byteBufferPool;
this.coreSession = coreSession;
this.generator = new Generator();
- this.parser = new Parser(retainableByteBufferPool, coreSession);
+ this.parser = new Parser(byteBufferPool, coreSession);
this.flusher = new Flusher(scheduler, coreSession.getOutputBufferSize(), generator, endp);
this.setInputBufferSize(coreSession.getInputBufferSize());
@@ -303,7 +303,7 @@ public class WebSocketConnection extends AbstractConnection implements Connectio
private RetainableByteBuffer newNetworkBuffer(int capacity)
{
- return retainableByteBufferPool.acquire(capacity, isUseInputDirectByteBuffers());
+ return byteBufferPool.acquire(capacity, isUseInputDirectByteBuffers());
}
private void releaseNetworkBuffer()
@@ -626,7 +626,7 @@ public class WebSocketConnection extends AbstractConnection implements Connectio
{
private Flusher(Scheduler scheduler, int bufferSize, Generator generator, EndPoint endpoint)
{
- super(retainableByteBufferPool, scheduler, generator, endpoint, bufferSize, 8);
+ super(byteBufferPool, scheduler, generator, endpoint, bufferSize, 8);
setUseDirectByteBuffers(isUseOutputDirectByteBuffers());
}
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketCoreSession.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketCoreSession.java
index 3a3aa7121e2..ac2ea5f6f8a 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketCoreSession.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketCoreSession.java
@@ -26,7 +26,7 @@ import java.util.concurrent.Executor;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.Utf8Appendable;
import org.eclipse.jetty.util.component.Dumpable;
@@ -240,9 +240,9 @@ public class WebSocketCoreSession implements IncomingFrames, CoreSession, Dumpab
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return components.getRetainableByteBufferPool();
+ return components.getByteBufferPool();
}
public void onEof()
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/ByteBufferMessageSink.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/ByteBufferMessageSink.java
index a3b945494c0..4f898a3e50c 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/ByteBufferMessageSink.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/ByteBufferMessageSink.java
@@ -19,8 +19,8 @@ import java.nio.ByteBuffer;
import java.util.Objects;
import org.eclipse.jetty.io.ByteBufferCallbackAccumulator;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.websocket.core.CoreSession;
@@ -84,7 +84,7 @@ public class ByteBufferMessageSink extends AbstractMessageSink
callback = Callback.NOOP;
if (frame.isFin())
{
- RetainableByteBufferPool bufferPool = session.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = session.getByteBufferPool();
RetainableByteBuffer buffer = bufferPool.acquire(out.getLength(), false);
ByteBuffer byteBuffer = buffer.getByteBuffer();
out.writeTo(byteBuffer);
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/MessageOutputStream.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/MessageOutputStream.java
index 2d17db34e70..f5823a418d3 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/MessageOutputStream.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/MessageOutputStream.java
@@ -17,8 +17,8 @@ import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.FutureCallback;
@@ -46,7 +46,7 @@ public class MessageOutputStream extends OutputStream
private boolean closed;
private byte messageOpCode = OpCode.BINARY;
- public MessageOutputStream(CoreSession coreSession, RetainableByteBufferPool bufferPool)
+ public MessageOutputStream(CoreSession coreSession, ByteBufferPool bufferPool)
{
this.coreSession = coreSession;
this.bufferSize = coreSession.getOutputBufferSize();
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/MessageWriter.java b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/MessageWriter.java
index 952b28c948b..0220d5b2711 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/MessageWriter.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/messages/MessageWriter.java
@@ -19,7 +19,7 @@ import java.nio.CharBuffer;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CodingErrorAction;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.websocket.core.CoreSession;
import org.eclipse.jetty.websocket.core.OpCode;
@@ -38,7 +38,7 @@ public class MessageWriter extends Writer
.onUnmappableCharacter(CodingErrorAction.REPORT)
.onMalformedInput(CodingErrorAction.REPORT);
- public MessageWriter(CoreSession coreSession, RetainableByteBufferPool bufferPool)
+ public MessageWriter(CoreSession coreSession, ByteBufferPool bufferPool)
{
this.outputStream = new MessageOutputStream(coreSession, bufferPool);
this.outputStream.setMessageType(OpCode.TEXT);
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/WebSocketServerComponents.java b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/WebSocketServerComponents.java
index d3ec78cfd92..0c8e31b32d4 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/WebSocketServerComponents.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/WebSocketServerComponents.java
@@ -15,7 +15,7 @@ package org.eclipse.jetty.websocket.core.server;
import java.util.concurrent.Executor;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.util.DecoratedObjectFactory;
@@ -27,7 +27,7 @@ import org.eclipse.jetty.websocket.core.WebSocketExtensionRegistry;
/**
* A collection of components which are the resources needed for websockets such as
- * {@link RetainableByteBufferPool}, {@link WebSocketExtensionRegistry}, and {@link DecoratedObjectFactory}.
+ * {@link ByteBufferPool}, {@link WebSocketExtensionRegistry}, and {@link DecoratedObjectFactory}.
*
* These components should be accessed through {@link WebSocketServerComponents#getWebSocketComponents} so that
* the instance can be shared by being stored as a bean on the ContextHandler.
@@ -39,7 +39,7 @@ public class WebSocketServerComponents extends WebSocketComponents
public static final String WEBSOCKET_DEFLATER_POOL_ATTRIBUTE = "jetty.websocket.deflater";
public static final String WEBSOCKET_BUFFER_POOL_ATTRIBUTE = "jetty.websocket.bufferPool";
- WebSocketServerComponents(InflaterPool inflaterPool, DeflaterPool deflaterPool, RetainableByteBufferPool bufferPool, DecoratedObjectFactory objectFactory, Executor executor)
+ WebSocketServerComponents(InflaterPool inflaterPool, DeflaterPool deflaterPool, ByteBufferPool bufferPool, DecoratedObjectFactory objectFactory, Executor executor)
{
super(null, objectFactory, bufferPool, inflaterPool, deflaterPool, executor);
}
@@ -53,7 +53,7 @@ public class WebSocketServerComponents extends WebSocketComponents
*
*
* Servlet context attributes can be set with {@link #WEBSOCKET_BUFFER_POOL_ATTRIBUTE}, {@link #WEBSOCKET_INFLATER_POOL_ATTRIBUTE}
- * and {@link #WEBSOCKET_DEFLATER_POOL_ATTRIBUTE} to override the {@link RetainableByteBufferPool}, {@link DeflaterPool} or
+ * and {@link #WEBSOCKET_DEFLATER_POOL_ATTRIBUTE} to override the {@link ByteBufferPool}, {@link DeflaterPool} or
* {@link InflaterPool} used by the components, otherwise this will try to use the pools shared on the {@link Server}.
*
* @param server the server.
@@ -75,9 +75,9 @@ public class WebSocketServerComponents extends WebSocketComponents
if (deflaterPool == null)
deflaterPool = DeflaterPool.ensurePool(server);
- RetainableByteBufferPool bufferPool = (RetainableByteBufferPool)context.getAttribute(WEBSOCKET_BUFFER_POOL_ATTRIBUTE);
+ ByteBufferPool bufferPool = (ByteBufferPool)context.getAttribute(WEBSOCKET_BUFFER_POOL_ATTRIBUTE);
if (bufferPool == null)
- bufferPool = server.getRetainableByteBufferPool();
+ bufferPool = server.getByteBufferPool();
Executor executor = (Executor)context.getAttribute("org.eclipse.jetty.server.Executor");
if (executor == null)
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/AbstractHandshaker.java b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/AbstractHandshaker.java
index 6c6fac9d3c7..8735d8d4e5e 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/AbstractHandshaker.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/AbstractHandshaker.java
@@ -20,8 +20,8 @@ import java.util.concurrent.Executor;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.PreEncodedHttpField;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.ConnectionMetaData;
import org.eclipse.jetty.server.Context;
import org.eclipse.jetty.server.HttpConfiguration;
@@ -188,9 +188,9 @@ public abstract class AbstractHandshaker implements Handshaker
protected abstract WebSocketConnection createWebSocketConnection(Request baseRequest, WebSocketCoreSession coreSession);
- protected WebSocketConnection newWebSocketConnection(EndPoint endPoint, Executor executor, Scheduler scheduler, RetainableByteBufferPool retainableByteBufferPool, WebSocketCoreSession coreSession)
+ protected WebSocketConnection newWebSocketConnection(EndPoint endPoint, Executor executor, Scheduler scheduler, ByteBufferPool byteBufferPool, WebSocketCoreSession coreSession)
{
- return new WebSocketConnection(endPoint, executor, scheduler, retainableByteBufferPool, coreSession);
+ return new WebSocketConnection(endPoint, executor, scheduler, byteBufferPool, coreSession);
}
protected abstract void prepareResponse(Response response, WebSocketNegotiation negotiation);
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/RFC6455Handshaker.java b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/RFC6455Handshaker.java
index 6b676064129..eb7c09b1e03 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/RFC6455Handshaker.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/RFC6455Handshaker.java
@@ -21,7 +21,7 @@ import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.http.PreEncodedHttpField;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.ConnectionMetaData;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Request;
@@ -79,8 +79,8 @@ public final class RFC6455Handshaker extends AbstractHandshaker
{
ConnectionMetaData connectionMetaData = baseRequest.getConnectionMetaData();
Connector connector = connectionMetaData.getConnector();
- RetainableByteBufferPool retainableByteBufferPool = connector.getRetainableByteBufferPool();
- return newWebSocketConnection(connectionMetaData.getConnection().getEndPoint(), connector.getExecutor(), connector.getScheduler(), retainableByteBufferPool, coreSession);
+ ByteBufferPool byteBufferPool = connector.getByteBufferPool();
+ return newWebSocketConnection(connectionMetaData.getConnection().getEndPoint(), connector.getExecutor(), connector.getScheduler(), byteBufferPool, coreSession);
}
@Override
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/RFC8441Handshaker.java b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/RFC8441Handshaker.java
index b838f05a939..365ac518a4e 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/RFC8441Handshaker.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/internal/RFC8441Handshaker.java
@@ -16,8 +16,8 @@ package org.eclipse.jetty.websocket.core.server.internal;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersion;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Response;
@@ -59,10 +59,10 @@ public class RFC8441Handshaker extends AbstractHandshaker
protected WebSocketConnection createWebSocketConnection(Request request, WebSocketCoreSession coreSession)
{
Connector connector = request.getConnectionMetaData().getConnector();
- RetainableByteBufferPool retainableByteBufferPool = connector.getRetainableByteBufferPool();
+ ByteBufferPool byteBufferPool = connector.getByteBufferPool();
TunnelSupport tunnelSupport = request.getTunnelSupport();
EndPoint endPoint = tunnelSupport.getEndPoint();
- return newWebSocketConnection(endPoint, connector.getExecutor(), connector.getScheduler(), retainableByteBufferPool, coreSession);
+ return newWebSocketConnection(endPoint, connector.getExecutor(), connector.getScheduler(), byteBufferPool, coreSession);
}
@Override
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/GeneratorParserRoundTripTest.java b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/GeneratorParserRoundTripTest.java
index 725551fd793..d0e7a998f9f 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/GeneratorParserRoundTripTest.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/GeneratorParserRoundTripTest.java
@@ -18,8 +18,8 @@ import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.websocket.core.internal.Generator;
import org.junit.jupiter.api.Test;
@@ -29,7 +29,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class GeneratorParserRoundTripTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testParserAndGenerator() throws Exception
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/MessageHandlerTest.java b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/MessageHandlerTest.java
index 04875c98dc0..19083cf8f9c 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/MessageHandlerTest.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/MessageHandlerTest.java
@@ -20,7 +20,7 @@ import java.util.List;
import java.util.concurrent.ExecutionException;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.FutureCallback;
@@ -61,7 +61,7 @@ public class MessageHandlerTest
coreSession = new CoreSession.Empty()
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Override
public void sendFrame(Frame frame, Callback callback, boolean batch)
@@ -71,7 +71,7 @@ public class MessageHandlerTest
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/ParserCapture.java b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/ParserCapture.java
index ac53eedd30f..d6c6cadae6b 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/ParserCapture.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/ParserCapture.java
@@ -55,7 +55,7 @@ public class ParserCapture
this.coreSession = new WebSocketCoreSession(new TestMessageHandler(), behavior, Negotiated.from(exStack), components);
coreSession.setAutoFragment(false);
coreSession.setMaxFrameSize(0);
- this.parser = new Parser(components.getRetainableByteBufferPool(), coreSession);
+ this.parser = new Parser(components.getByteBufferPool(), coreSession);
}
public void parse(ByteBuffer buffer)
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/WebSocketTester.java b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/WebSocketTester.java
index 692cec81bd3..4010a1a4e95 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/WebSocketTester.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/WebSocketTester.java
@@ -25,8 +25,8 @@ import java.util.Base64;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.websocket.core.internal.Parser;
@@ -42,7 +42,7 @@ public class WebSocketTester
{
private static final String NON_RANDOM_KEY = Base64.getEncoder().encodeToString("0123456701234567".getBytes());
private static SslContextFactory.Client sslContextFactory;
- protected RetainableByteBufferPool bufferPool;
+ protected ByteBufferPool bufferPool;
protected RetainableByteBuffer buffer;
protected Parser parser;
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/internal/FrameFlusherTest.java b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/internal/FrameFlusherTest.java
index 321d6cc78ef..fddcb5e8399 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/internal/FrameFlusherTest.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/internal/FrameFlusherTest.java
@@ -27,7 +27,7 @@ import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.FutureCallback;
import org.eclipse.jetty.util.thread.ScheduledExecutorScheduler;
@@ -52,7 +52,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class FrameFlusherTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
private Scheduler scheduler;
@BeforeEach
@@ -231,7 +231,7 @@ public class FrameFlusherTest
public Parser parser;
public LinkedBlockingQueue incomingFrames = new LinkedBlockingQueue<>();
- public CapturingEndPoint(RetainableByteBufferPool bufferPool)
+ public CapturingEndPoint(ByteBufferPool bufferPool)
{
parser = new Parser(bufferPool);
}
@@ -282,7 +282,7 @@ public class FrameFlusherTest
blockTime = time;
}
- public BlockingEndpoint(RetainableByteBufferPool bufferPool)
+ public BlockingEndpoint(ByteBufferPool bufferPool)
{
super(bufferPool);
}
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/util/MessageWriterTest.java b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/util/MessageWriterTest.java
index ca25168bef0..efd67814b72 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/util/MessageWriterTest.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/util/MessageWriterTest.java
@@ -21,7 +21,7 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.Utf8StringBuilder;
import org.eclipse.jetty.websocket.core.CoreSession;
@@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
public class MessageWriterTest
{
private final CoreSession coreSession = new CoreSession.Empty();
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testMultipleWrites() throws Exception
diff --git a/jetty-ee10/jetty-ee10-annotations/src/test/java/org/eclipse/jetty/ee10/annotations/TestAnnotationParser.java b/jetty-ee10/jetty-ee10-annotations/src/test/java/org/eclipse/jetty/ee10/annotations/TestAnnotationParser.java
index 347ce318fa4..e7872f38c70 100644
--- a/jetty-ee10/jetty-ee10-annotations/src/test/java/org/eclipse/jetty/ee10/annotations/TestAnnotationParser.java
+++ b/jetty-ee10/jetty-ee10-annotations/src/test/java/org/eclipse/jetty/ee10/annotations/TestAnnotationParser.java
@@ -47,7 +47,6 @@ import static org.hamcrest.Matchers.notNullValue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
-import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@ExtendWith(WorkDirExtension.class)
diff --git a/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/MavenServerConnector.java b/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/MavenServerConnector.java
index 2e24e306c50..ac35c0577f2 100644
--- a/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/MavenServerConnector.java
+++ b/jetty-ee10/jetty-ee10-maven-plugin/src/main/java/org/eclipse/jetty/ee10/maven/plugin/MavenServerConnector.java
@@ -18,8 +18,8 @@ import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.ConnectionFactory;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
@@ -146,9 +146,9 @@ public class MavenServerConnector extends ContainerLifeCycle implements Connecto
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return checkDelegate().getRetainableByteBufferPool();
+ return checkDelegate().getByteBufferPool();
}
@Override
diff --git a/jetty-ee10/jetty-ee10-osgi/test-jetty-ee10-osgi/src/test/java/org/eclipse/jetty/ee10/osgi/test/TestJettyOSGiAnnotationParser.java b/jetty-ee10/jetty-ee10-osgi/test-jetty-ee10-osgi/src/test/java/org/eclipse/jetty/ee10/osgi/test/TestJettyOSGiAnnotationParser.java
index 97f807d2fef..63b1780c8cf 100644
--- a/jetty-ee10/jetty-ee10-osgi/test-jetty-ee10-osgi/src/test/java/org/eclipse/jetty/ee10/osgi/test/TestJettyOSGiAnnotationParser.java
+++ b/jetty-ee10/jetty-ee10-osgi/test-jetty-ee10-osgi/src/test/java/org/eclipse/jetty/ee10/osgi/test/TestJettyOSGiAnnotationParser.java
@@ -41,7 +41,6 @@ import org.osgi.framework.BundleContext;
import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-
/**
* TestJettyOSGiAnnotationParser
*
diff --git a/jetty-ee10/jetty-ee10-proxy/src/main/java/org/eclipse/jetty/ee10/proxy/AsyncMiddleManServlet.java b/jetty-ee10/jetty-ee10-proxy/src/main/java/org/eclipse/jetty/ee10/proxy/AsyncMiddleManServlet.java
index 1adcff3860d..7b6434c7819 100644
--- a/jetty-ee10/jetty-ee10-proxy/src/main/java/org/eclipse/jetty/ee10/proxy/AsyncMiddleManServlet.java
+++ b/jetty-ee10/jetty-ee10-proxy/src/main/java/org/eclipse/jetty/ee10/proxy/AsyncMiddleManServlet.java
@@ -43,9 +43,9 @@ import org.eclipse.jetty.client.Request;
import org.eclipse.jetty.client.Response;
import org.eclipse.jetty.client.Result;
import org.eclipse.jetty.http.HttpHeader;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.RuntimeIOException;
import org.eclipse.jetty.server.handler.ConnectHandler;
import org.eclipse.jetty.util.BufferUtil;
@@ -775,7 +775,7 @@ public class AsyncMiddleManServlet extends AbstractProxyServlet
try
{
this.transformer = transformer;
- RetainableByteBufferPool bufferPool = httpClient == null ? null : httpClient.getRetainableByteBufferPool();
+ ByteBufferPool bufferPool = httpClient == null ? null : httpClient.getByteBufferPool();
this.decoder = new GZIPContentDecoder(bufferPool, GZIPContentDecoder.DEFAULT_BUFFER_SIZE);
this.out = new ByteArrayOutputStream();
this.gzipOut = new GZIPOutputStream(out);
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java
index 114dd6aba07..b567bb8fcb9 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java
@@ -60,7 +60,7 @@ import org.eclipse.jetty.http.content.ResourceHttpContentFactory;
import org.eclipse.jetty.http.content.ValidatingCachingHttpContentFactory;
import org.eclipse.jetty.http.content.VirtualHttpContentFactory;
import org.eclipse.jetty.io.ByteBufferInputStream;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.Context;
import org.eclipse.jetty.server.HttpStream;
import org.eclipse.jetty.server.Request;
@@ -167,7 +167,7 @@ public class DefaultServlet extends HttpServlet
long cacheValidationTime = getInitParameter("cacheValidationTime") != null ? Long.parseLong(getInitParameter("cacheValidationTime")) : -2;
if (maxCachedFiles != -2 || maxCacheSize != -2 || maxCachedFileSize != -2 || cacheValidationTime != -2)
{
- RetainableByteBufferPool bufferPool = getRetainableByteBufferPool(servletContextHandler);
+ ByteBufferPool bufferPool = getByteBufferPool(servletContextHandler);
ValidatingCachingHttpContentFactory cached = new ValidatingCachingHttpContentFactory(contentFactory,
(cacheValidationTime > -2) ? cacheValidationTime : Duration.ofSeconds(1).toMillis(), bufferPool);
contentFactory = cached;
@@ -238,14 +238,14 @@ public class DefaultServlet extends HttpServlet
}
}
- private static RetainableByteBufferPool getRetainableByteBufferPool(ContextHandler contextHandler)
+ private static ByteBufferPool getByteBufferPool(ContextHandler contextHandler)
{
if (contextHandler == null)
- return new RetainableByteBufferPool.NonPooling();
+ return new ByteBufferPool.NonPooling();
Server server = contextHandler.getServer();
if (server == null)
- return new RetainableByteBufferPool.NonPooling();
- return server.getRetainableByteBufferPool();
+ return new ByteBufferPool.NonPooling();
+ return server.getByteBufferPool();
}
private String getInitParameter(String name, String... deprecated)
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/HttpOutput.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/HttpOutput.java
index c039c45d1ca..6954fd836be 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/HttpOutput.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/HttpOutput.java
@@ -31,10 +31,10 @@ import jakarta.servlet.ServletOutputStream;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.WriteListener;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EofException;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.ConnectionMetaData;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.Response;
@@ -130,7 +130,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
private final ConnectionMetaData _connectionMetaData;
private final ServletChannel _servletChannel;
private final Response _response;
- private final RetainableByteBufferPool _bufferPool;
+ private final ByteBufferPool _bufferPool;
private final ServletRequestState _channelState;
private final SharedBlockingCallback _writeBlocker;
private ApiState _apiState = ApiState.BLOCKING;
@@ -151,7 +151,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
_response = response;
_servletChannel = channel;
_connectionMetaData = _response.getRequest().getConnectionMetaData();
- _bufferPool = _response.getRequest().getComponents().getRetainableByteBufferPool();
+ _bufferPool = _response.getRequest().getComponents().getByteBufferPool();
_channelState = _servletChannel.getState();
_writeBlocker = new WriteBlocker(_servletChannel);
diff --git a/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-sessions/jetty-ee10-test-sessions-jdbc/src/test/java/org/eclipse/jetty/ee10/session/jdbc/ReloadedSessionMissingClassTest.java b/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-sessions/jetty-ee10-test-sessions-jdbc/src/test/java/org/eclipse/jetty/ee10/session/jdbc/ReloadedSessionMissingClassTest.java
index 4fd6897465e..73dbc453454 100644
--- a/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-sessions/jetty-ee10-test-sessions-jdbc/src/test/java/org/eclipse/jetty/ee10/session/jdbc/ReloadedSessionMissingClassTest.java
+++ b/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-sessions/jetty-ee10-test-sessions-jdbc/src/test/java/org/eclipse/jetty/ee10/session/jdbc/ReloadedSessionMissingClassTest.java
@@ -43,7 +43,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
-
/**
* ReloadedSessionMissingClassTest
*/
diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/common/JakartaWebSocketContainer.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/common/JakartaWebSocketContainer.java
index cd4ad79dc5b..73eb840e98b 100644
--- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/common/JakartaWebSocketContainer.java
+++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/common/JakartaWebSocketContainer.java
@@ -24,7 +24,7 @@ import java.util.function.Consumer;
import jakarta.websocket.Extension;
import jakarta.websocket.WebSocketContainer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.DecoratedObjectFactory;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
import org.eclipse.jetty.util.component.Dumpable;
@@ -53,9 +53,9 @@ public abstract class JakartaWebSocketContainer extends ContainerLifeCycle imple
protected abstract JakartaWebSocketFrameHandlerFactory getFrameHandlerFactory();
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return components.getRetainableByteBufferPool();
+ return components.getByteBufferPool();
}
public WebSocketExtensionRegistry getExtensionRegistry()
diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/common/JakartaWebSocketRemoteEndpoint.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/common/JakartaWebSocketRemoteEndpoint.java
index 70ef22ee04f..ad829a66032 100644
--- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/common/JakartaWebSocketRemoteEndpoint.java
+++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/common/JakartaWebSocketRemoteEndpoint.java
@@ -49,12 +49,12 @@ public class JakartaWebSocketRemoteEndpoint implements jakarta.websocket.RemoteE
protected MessageWriter newMessageWriter()
{
- return new MessageWriter(coreSession, session.getContainerImpl().getRetainableByteBufferPool());
+ return new MessageWriter(coreSession, session.getContainerImpl().getByteBufferPool());
}
protected MessageOutputStream newMessageOutputStream()
{
- return new MessageOutputStream(coreSession, session.getContainerImpl().getRetainableByteBufferPool());
+ return new MessageOutputStream(coreSession, session.getContainerImpl().getByteBufferPool());
}
@Override
diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/common/AbstractSessionTest.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/common/AbstractSessionTest.java
index 8a68ff66a04..e86f8cca33b 100644
--- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/common/AbstractSessionTest.java
+++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/common/AbstractSessionTest.java
@@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit;
import jakarta.websocket.Endpoint;
import jakarta.websocket.EndpointConfig;
import jakarta.websocket.Session;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.websocket.core.CoreSession;
import org.eclipse.jetty.websocket.core.WebSocketComponents;
import org.junit.jupiter.api.AfterAll;
@@ -64,9 +64,9 @@ public abstract class AbstractSessionTest
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return components.getRetainableByteBufferPool();
+ return components.getByteBufferPool();
}
public void waitForDemand(long timeout, TimeUnit timeUnit) throws InterruptedException
diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/common/messages/MessageWriterTest.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/common/messages/MessageWriterTest.java
index d44872ae988..64bcdb1cbfd 100644
--- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/common/messages/MessageWriterTest.java
+++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee10/websocket/jakarta/common/messages/MessageWriterTest.java
@@ -20,7 +20,7 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.Utf8StringBuilder;
import org.eclipse.jetty.websocket.core.CoreSession;
@@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.is;
public class MessageWriterTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testSingleByteArray512b() throws IOException, InterruptedException
diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/tests/LocalServer.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/tests/LocalServer.java
index ede2a226289..8f68771fda6 100644
--- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/tests/LocalServer.java
+++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jakarta-tests/src/main/java/org/eclipse/jetty/ee10/websocket/jakarta/tests/LocalServer.java
@@ -29,7 +29,7 @@ import org.eclipse.jetty.ee10.websocket.jakarta.server.config.JakartaWebSocketSe
import org.eclipse.jetty.ee10.websocket.jakarta.server.internal.JakartaWebSocketServerContainer;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
@@ -60,7 +60,7 @@ public class LocalServer extends ContainerLifeCycle implements LocalFuzzer.Provi
}
private static final Logger LOG = LoggerFactory.getLogger(LocalServer.class);
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
private Server server;
private ServerConnector connector;
private LocalConnector localConnector;
diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee10/websocket/client/WebSocketClient.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee10/websocket/client/WebSocketClient.java
index b23fb35da40..7a6f1513343 100644
--- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee10/websocket/client/WebSocketClient.java
+++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee10/websocket/client/WebSocketClient.java
@@ -39,8 +39,8 @@ import org.eclipse.jetty.ee10.websocket.client.impl.JettyClientUpgradeRequest;
import org.eclipse.jetty.ee10.websocket.common.JettyWebSocketFrameHandler;
import org.eclipse.jetty.ee10.websocket.common.JettyWebSocketFrameHandlerFactory;
import org.eclipse.jetty.ee10.websocket.common.SessionTracker;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.DecoratedObjectFactory;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
import org.eclipse.jetty.util.component.Graceful;
@@ -333,9 +333,9 @@ public class WebSocketClient extends ContainerLifeCycle implements WebSocketPoli
getHttpClient().setCookieStore(cookieStore);
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return getHttpClient().getRetainableByteBufferPool();
+ return getHttpClient().getByteBufferPool();
}
@Override
diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee10/websocket/common/MessageOutputStreamTest.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee10/websocket/common/MessageOutputStreamTest.java
index 273de5d31e3..a99c343a0c1 100644
--- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee10/websocket/common/MessageOutputStreamTest.java
+++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee10/websocket/common/MessageOutputStreamTest.java
@@ -19,8 +19,8 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.websocket.core.internal.messages.MessageOutputStream;
import org.junit.jupiter.api.AfterEach;
@@ -40,7 +40,7 @@ public class MessageOutputStreamTest
private static final int OUTPUT_BUFFER_SIZE = 4096;
private final AtomicInteger leaks = new AtomicInteger();
- private RetainableByteBufferPool bufferPool;
+ private ByteBufferPool bufferPool;
private OutgoingMessageCapture sessionCapture;
@BeforeEach
diff --git a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee10/websocket/common/OutgoingMessageCapture.java b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee10/websocket/common/OutgoingMessageCapture.java
index e0ac3175b60..df12002a278 100644
--- a/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee10/websocket/common/OutgoingMessageCapture.java
+++ b/jetty-ee10/jetty-ee10-websocket/jetty-ee10-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee10/websocket/common/OutgoingMessageCapture.java
@@ -20,7 +20,7 @@ import java.nio.ByteBuffer;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.toolchain.test.Hex;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.websocket.core.CloseStatus;
@@ -41,7 +41,7 @@ public class OutgoingMessageCapture extends CoreSession.Empty implements CoreSes
public BlockingQueue binaryMessages = new LinkedBlockingDeque<>();
public BlockingQueue events = new LinkedBlockingDeque<>();
- private final RetainableByteBufferPool bufferPool = new RetainableByteBufferPool.NonPooling();
+ private final ByteBufferPool bufferPool = new ByteBufferPool.NonPooling();
private final MethodHandle wholeTextHandle;
private final MethodHandle wholeBinaryHandle;
private MessageSink messageSink;
@@ -128,7 +128,7 @@ public class OutgoingMessageCapture extends CoreSession.Empty implements CoreSes
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}
diff --git a/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/MavenServerConnector.java b/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/MavenServerConnector.java
index 52e902574dc..b2b52b7d835 100644
--- a/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/MavenServerConnector.java
+++ b/jetty-ee9/jetty-ee9-maven-plugin/src/main/java/org/eclipse/jetty/ee9/maven/plugin/MavenServerConnector.java
@@ -18,8 +18,8 @@ import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.EndPoint;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.ConnectionFactory;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
@@ -149,9 +149,9 @@ public class MavenServerConnector extends ContainerLifeCycle implements Connecto
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return checkDelegate().getRetainableByteBufferPool();
+ return checkDelegate().getByteBufferPool();
}
@Override
diff --git a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannel.java b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannel.java
index c72036b2eca..ba673de9352 100644
--- a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannel.java
+++ b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannel.java
@@ -43,11 +43,11 @@ import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.http.MetaData;
import org.eclipse.jetty.http.Trailers;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.QuietException;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.server.AbstractConnector;
import org.eclipse.jetty.server.ConnectionMetaData;
import org.eclipse.jetty.server.Connector;
@@ -312,9 +312,9 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor
_endPoint.setIdleTimeout(timeoutMs);
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return _connector.getRetainableByteBufferPool();
+ return _connector.getByteBufferPool();
}
public HttpConfiguration getHttpConfiguration()
diff --git a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpOutput.java b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpOutput.java
index 045368e06af..9413c2da898 100644
--- a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpOutput.java
+++ b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpOutput.java
@@ -647,7 +647,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
private RetainableByteBuffer acquireBuffer()
{
if (_aggregate == null)
- _aggregate = _channel.getRetainableByteBufferPool().acquire(getBufferSize(), _channel.isUseOutputDirectByteBuffers());
+ _aggregate = _channel.getByteBufferPool().acquire(getBufferSize(), _channel.isUseOutputDirectByteBuffers());
return _aggregate;
}
@@ -1083,7 +1083,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
encoder.reset();
}
- RetainableByteBuffer out = getHttpChannel().getRetainableByteBufferPool().acquire((int)(1 + (s.length() + 2) * encoder.averageBytesPerChar()), false);
+ RetainableByteBuffer out = getHttpChannel().getByteBufferPool().acquire((int)(1 + (s.length() + 2) * encoder.averageBytesPerChar()), false);
try
{
CharBuffer in = CharBuffer.wrap(s);
@@ -1119,7 +1119,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
if (result.isOverflow())
{
BufferUtil.flipToFlush(byteBuffer, 0);
- RetainableByteBuffer bigger = _channel.getRetainableByteBufferPool().acquire(out.capacity() + s.length() + 2, out.isDirect());
+ RetainableByteBuffer bigger = _channel.getByteBufferPool().acquire(out.capacity() + s.length() + 2, out.isDirect());
BufferUtil.flipToFill(bigger.getByteBuffer());
bigger.getByteBuffer().put(byteBuffer);
out.release();
@@ -1736,7 +1736,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
super(callback, true);
_in = in;
// Reading from InputStream requires byte[], don't use direct buffers.
- _buffer = _channel.getRetainableByteBufferPool().acquire(getBufferSize(), false);
+ _buffer = _channel.getByteBufferPool().acquire(getBufferSize(), false);
}
@Override
@@ -1811,7 +1811,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
{
super(callback, true);
_in = in;
- _buffer = _channel.getRetainableByteBufferPool().acquire(getBufferSize(), _channel.isUseOutputDirectByteBuffers());
+ _buffer = _channel.getByteBufferPool().acquire(getBufferSize(), _channel.isUseOutputDirectByteBuffers());
}
@Override
diff --git a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/ResourceHandler.java b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/ResourceHandler.java
index ec4913c5b7f..1557584d954 100644
--- a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/ResourceHandler.java
+++ b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/ResourceHandler.java
@@ -35,7 +35,7 @@ import org.eclipse.jetty.http.content.PreCompressedHttpContentFactory;
import org.eclipse.jetty.http.content.ResourceHttpContentFactory;
import org.eclipse.jetty.http.content.ValidatingCachingHttpContentFactory;
import org.eclipse.jetty.http.content.VirtualHttpContentFactory;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.URIUtil;
import org.eclipse.jetty.util.resource.Resource;
@@ -54,7 +54,7 @@ public class ResourceHandler extends HandlerWrapper implements ResourceFactory,
{
private static final Logger LOG = LoggerFactory.getLogger(ResourceHandler.class);
- private RetainableByteBufferPool _bufferPool;
+ private ByteBufferPool _bufferPool;
Resource _baseResource;
ContextHandler _context;
Resource _defaultStyleSheet;
@@ -105,7 +105,7 @@ public class ResourceHandler extends HandlerWrapper implements ResourceFactory,
if (_mimeTypes == null)
_mimeTypes = _context == null ? MimeTypes.DEFAULTS : _context.getMimeTypes();
- _bufferPool = getRetainableByteBufferPool(_context);
+ _bufferPool = getByteBufferPool(_context);
if (_resourceService.getHttpContentFactory() == null)
_resourceService.setHttpContentFactory(newHttpContentFactory());
_resourceService.setWelcomeFactory(this);
@@ -113,14 +113,14 @@ public class ResourceHandler extends HandlerWrapper implements ResourceFactory,
super.doStart();
}
- private static RetainableByteBufferPool getRetainableByteBufferPool(ContextHandler contextHandler)
+ private static ByteBufferPool getByteBufferPool(ContextHandler contextHandler)
{
if (contextHandler == null)
- return new RetainableByteBufferPool.NonPooling();
+ return new ByteBufferPool.NonPooling();
Server server = contextHandler.getServer();
if (server == null)
- return new RetainableByteBufferPool.NonPooling();
- return server.getRetainableByteBufferPool();
+ return new ByteBufferPool.NonPooling();
+ return server.getByteBufferPool();
}
public HttpContent.Factory getHttpContentFactory()
diff --git a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/MockConnector.java b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/MockConnector.java
index a247a95607b..0681f1ce8bc 100644
--- a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/MockConnector.java
+++ b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/MockConnector.java
@@ -27,7 +27,7 @@ public class MockConnector extends AbstractConnector
public MockConnector(Server server)
{
- super(server, server.getThreadPool(), server.getScheduler(), server.getRetainableByteBufferPool(), 0);
+ super(server, server.getThreadPool(), server.getScheduler(), server.getByteBufferPool(), 0);
}
@Override
diff --git a/jetty-ee9/jetty-ee9-osgi/test-jetty-ee9-osgi/src/test/java/org/eclipse/jetty/ee9/osgi/test/TestJettyOSGiAnnotationParser.java b/jetty-ee9/jetty-ee9-osgi/test-jetty-ee9-osgi/src/test/java/org/eclipse/jetty/ee9/osgi/test/TestJettyOSGiAnnotationParser.java
index 27f7d6585b0..ec328dceb0e 100644
--- a/jetty-ee9/jetty-ee9-osgi/test-jetty-ee9-osgi/src/test/java/org/eclipse/jetty/ee9/osgi/test/TestJettyOSGiAnnotationParser.java
+++ b/jetty-ee9/jetty-ee9-osgi/test-jetty-ee9-osgi/src/test/java/org/eclipse/jetty/ee9/osgi/test/TestJettyOSGiAnnotationParser.java
@@ -41,7 +41,6 @@ import org.osgi.framework.BundleContext;
import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-
/**
* TestJettyOSGiAnnotationParser
*
diff --git a/jetty-ee9/jetty-ee9-proxy/src/main/java/org/eclipse/jetty/ee9/proxy/AsyncMiddleManServlet.java b/jetty-ee9/jetty-ee9-proxy/src/main/java/org/eclipse/jetty/ee9/proxy/AsyncMiddleManServlet.java
index 74f4e6b9aec..27668245dd0 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/main/java/org/eclipse/jetty/ee9/proxy/AsyncMiddleManServlet.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/main/java/org/eclipse/jetty/ee9/proxy/AsyncMiddleManServlet.java
@@ -43,9 +43,9 @@ import org.eclipse.jetty.client.Request;
import org.eclipse.jetty.client.Response;
import org.eclipse.jetty.client.Result;
import org.eclipse.jetty.http.HttpHeader;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.RuntimeIOException;
import org.eclipse.jetty.server.handler.ConnectHandler;
import org.eclipse.jetty.util.BufferUtil;
@@ -775,7 +775,7 @@ public class AsyncMiddleManServlet extends AbstractProxyServlet
try
{
this.transformer = transformer;
- RetainableByteBufferPool byteBufferPool = httpClient == null ? null : httpClient.getRetainableByteBufferPool();
+ ByteBufferPool byteBufferPool = httpClient == null ? null : httpClient.getByteBufferPool();
this.decoder = new GZIPContentDecoder(byteBufferPool, GZIPContentDecoder.DEFAULT_BUFFER_SIZE);
this.out = new ByteArrayOutputStream();
this.gzipOut = new GZIPOutputStream(out);
diff --git a/jetty-ee9/jetty-ee9-servlet/src/main/java/org/eclipse/jetty/ee9/servlet/DefaultServlet.java b/jetty-ee9/jetty-ee9-servlet/src/main/java/org/eclipse/jetty/ee9/servlet/DefaultServlet.java
index d47b8f18e91..1ac81c1abe4 100644
--- a/jetty-ee9/jetty-ee9-servlet/src/main/java/org/eclipse/jetty/ee9/servlet/DefaultServlet.java
+++ b/jetty-ee9/jetty-ee9-servlet/src/main/java/org/eclipse/jetty/ee9/servlet/DefaultServlet.java
@@ -41,7 +41,7 @@ import org.eclipse.jetty.http.content.PreCompressedHttpContentFactory;
import org.eclipse.jetty.http.content.ResourceHttpContentFactory;
import org.eclipse.jetty.http.content.ValidatingCachingHttpContentFactory;
import org.eclipse.jetty.http.content.VirtualHttpContentFactory;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.URIUtil;
@@ -261,7 +261,7 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory, Welc
long cacheValidationTime = getInitParameter("cacheValidationTime") != null ? Long.parseLong(getInitParameter("cacheValidationTime")) : -2;
if (maxCachedFiles != -2 || maxCacheSize != -2 || maxCachedFileSize != -2 || cacheValidationTime != -2)
{
- RetainableByteBufferPool bufferPool = getRetainableByteBufferPool(_contextHandler);
+ ByteBufferPool bufferPool = getByteBufferPool(_contextHandler);
_cachingContentFactory = new ValidatingCachingHttpContentFactory(contentFactory,
(cacheValidationTime > -2) ? cacheValidationTime : Duration.ofSeconds(1).toMillis(), bufferPool);
contentFactory = _cachingContentFactory;
@@ -301,14 +301,14 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory, Welc
LOG.debug("resource base = {}", _baseResource);
}
- private static RetainableByteBufferPool getRetainableByteBufferPool(ContextHandler contextHandler)
+ private static ByteBufferPool getByteBufferPool(ContextHandler contextHandler)
{
if (contextHandler == null)
- return new RetainableByteBufferPool.NonPooling();
+ return new ByteBufferPool.NonPooling();
Server server = contextHandler.getServer();
if (server == null)
- return new RetainableByteBufferPool.NonPooling();
- return server.getRetainableByteBufferPool();
+ return new ByteBufferPool.NonPooling();
+ return server.getByteBufferPool();
}
private String getInitParameter(String name, String... deprecated)
diff --git a/jetty-ee9/jetty-ee9-tests/jetty-ee9-test-sessions/jetty-ee9-test-sessions-jdbc/src/test/java/org/eclipse/jetty/ee9/session/jdbc/ReloadedSessionMissingClassTest.java b/jetty-ee9/jetty-ee9-tests/jetty-ee9-test-sessions/jetty-ee9-test-sessions-jdbc/src/test/java/org/eclipse/jetty/ee9/session/jdbc/ReloadedSessionMissingClassTest.java
index eb8b044c216..db54a76e9af 100644
--- a/jetty-ee9/jetty-ee9-tests/jetty-ee9-test-sessions/jetty-ee9-test-sessions-jdbc/src/test/java/org/eclipse/jetty/ee9/session/jdbc/ReloadedSessionMissingClassTest.java
+++ b/jetty-ee9/jetty-ee9-tests/jetty-ee9-test-sessions/jetty-ee9-test-sessions-jdbc/src/test/java/org/eclipse/jetty/ee9/session/jdbc/ReloadedSessionMissingClassTest.java
@@ -43,7 +43,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
-
/**
* ReloadedSessionMissingClassTest
*/
diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/common/JakartaWebSocketContainer.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/common/JakartaWebSocketContainer.java
index 50a2e85ef83..867c67e84f7 100644
--- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/common/JakartaWebSocketContainer.java
+++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/common/JakartaWebSocketContainer.java
@@ -24,7 +24,7 @@ import java.util.function.Consumer;
import jakarta.websocket.Extension;
import jakarta.websocket.WebSocketContainer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.DecoratedObjectFactory;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
import org.eclipse.jetty.util.component.Dumpable;
@@ -53,9 +53,9 @@ public abstract class JakartaWebSocketContainer extends ContainerLifeCycle imple
protected abstract JakartaWebSocketFrameHandlerFactory getFrameHandlerFactory();
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return components.getRetainableByteBufferPool();
+ return components.getByteBufferPool();
}
public WebSocketExtensionRegistry getExtensionRegistry()
diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/common/JakartaWebSocketRemoteEndpoint.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/common/JakartaWebSocketRemoteEndpoint.java
index fdb264cc1e5..be674872be4 100644
--- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/common/JakartaWebSocketRemoteEndpoint.java
+++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/common/JakartaWebSocketRemoteEndpoint.java
@@ -49,12 +49,12 @@ public class JakartaWebSocketRemoteEndpoint implements jakarta.websocket.RemoteE
protected MessageWriter newMessageWriter()
{
- return new MessageWriter(coreSession, session.getContainerImpl().getRetainableByteBufferPool());
+ return new MessageWriter(coreSession, session.getContainerImpl().getByteBufferPool());
}
protected MessageOutputStream newMessageOutputStream()
{
- return new MessageOutputStream(coreSession, session.getContainerImpl().getRetainableByteBufferPool());
+ return new MessageOutputStream(coreSession, session.getContainerImpl().getByteBufferPool());
}
@Override
diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/common/AbstractSessionTest.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/common/AbstractSessionTest.java
index 38ee8256593..03de65a60df 100644
--- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/common/AbstractSessionTest.java
+++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/common/AbstractSessionTest.java
@@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit;
import jakarta.websocket.Endpoint;
import jakarta.websocket.EndpointConfig;
import jakarta.websocket.Session;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.websocket.core.CoreSession;
import org.eclipse.jetty.websocket.core.WebSocketComponents;
import org.junit.jupiter.api.AfterAll;
@@ -64,9 +64,9 @@ public abstract class AbstractSessionTest
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return components.getRetainableByteBufferPool();
+ return components.getByteBufferPool();
}
public void waitForDemand(long timeout, TimeUnit timeUnit) throws InterruptedException
diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/common/messages/MessageWriterTest.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/common/messages/MessageWriterTest.java
index 9bfc413c904..fd29ba5bd88 100644
--- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/common/messages/MessageWriterTest.java
+++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-common/src/test/java/org/eclipse/jetty/ee9/websocket/jakarta/common/messages/MessageWriterTest.java
@@ -20,7 +20,7 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.Utf8StringBuilder;
import org.eclipse.jetty.websocket.core.CoreSession;
@@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.is;
public class MessageWriterTest
{
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
@Test
public void testSingleByteArray512b() throws IOException, InterruptedException
diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/tests/LocalServer.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/tests/LocalServer.java
index e0a1700b5d2..ca1202eae88 100644
--- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/tests/LocalServer.java
+++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jakarta-tests/src/main/java/org/eclipse/jetty/ee9/websocket/jakarta/tests/LocalServer.java
@@ -29,7 +29,7 @@ import org.eclipse.jetty.ee9.websocket.jakarta.server.config.JakartaWebSocketSer
import org.eclipse.jetty.ee9.websocket.jakarta.server.internal.JakartaWebSocketServerContainer;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
@@ -60,7 +60,7 @@ public class LocalServer extends ContainerLifeCycle implements LocalFuzzer.Provi
}
private static final Logger LOG = LoggerFactory.getLogger(LocalServer.class);
- private final RetainableByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
+ private final ByteBufferPool bufferPool = new ArrayRetainableByteBufferPool();
private Server server;
private ServerConnector connector;
private LocalConnector localConnector;
diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee9/websocket/client/WebSocketClient.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee9/websocket/client/WebSocketClient.java
index d83492838d6..87387e557e5 100644
--- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee9/websocket/client/WebSocketClient.java
+++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-client/src/main/java/org/eclipse/jetty/ee9/websocket/client/WebSocketClient.java
@@ -40,8 +40,8 @@ import org.eclipse.jetty.ee9.websocket.client.impl.JettyClientUpgradeRequest;
import org.eclipse.jetty.ee9.websocket.common.JettyWebSocketFrameHandler;
import org.eclipse.jetty.ee9.websocket.common.JettyWebSocketFrameHandlerFactory;
import org.eclipse.jetty.ee9.websocket.common.SessionTracker;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.DecoratedObjectFactory;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
import org.eclipse.jetty.util.component.Graceful;
@@ -334,9 +334,9 @@ public class WebSocketClient extends ContainerLifeCycle implements WebSocketPoli
getHttpClient().setCookieStore(cookieStore);
}
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
- return getHttpClient().getRetainableByteBufferPool();
+ return getHttpClient().getByteBufferPool();
}
@Override
diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee9/websocket/common/MessageOutputStreamTest.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee9/websocket/common/MessageOutputStreamTest.java
index eb43d0acf25..85b23b06de3 100644
--- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee9/websocket/common/MessageOutputStreamTest.java
+++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee9/websocket/common/MessageOutputStreamTest.java
@@ -19,8 +19,8 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.eclipse.jetty.io.ArrayRetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBuffer;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.websocket.core.internal.messages.MessageOutputStream;
import org.junit.jupiter.api.AfterEach;
@@ -40,7 +40,7 @@ public class MessageOutputStreamTest
private static final int OUTPUT_BUFFER_SIZE = 4096;
private final AtomicInteger leaks = new AtomicInteger();
- private RetainableByteBufferPool bufferPool;
+ private ByteBufferPool bufferPool;
private OutgoingMessageCapture sessionCapture;
@BeforeEach
diff --git a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee9/websocket/common/OutgoingMessageCapture.java b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee9/websocket/common/OutgoingMessageCapture.java
index 7e0a2c3853f..f0e62eb0536 100644
--- a/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee9/websocket/common/OutgoingMessageCapture.java
+++ b/jetty-ee9/jetty-ee9-websocket/jetty-ee9-websocket-jetty-common/src/test/java/org/eclipse/jetty/ee9/websocket/common/OutgoingMessageCapture.java
@@ -20,7 +20,7 @@ import java.nio.ByteBuffer;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;
-import org.eclipse.jetty.io.RetainableByteBufferPool;
+import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.toolchain.test.Hex;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.websocket.core.CloseStatus;
@@ -41,7 +41,7 @@ public class OutgoingMessageCapture extends CoreSession.Empty implements CoreSes
public BlockingQueue binaryMessages = new LinkedBlockingDeque<>();
public BlockingQueue events = new LinkedBlockingDeque<>();
- private final RetainableByteBufferPool bufferPool = new RetainableByteBufferPool.NonPooling();
+ private final ByteBufferPool bufferPool = new ByteBufferPool.NonPooling();
private final MethodHandle wholeTextHandle;
private final MethodHandle wholeBinaryHandle;
private MessageSink messageSink;
@@ -128,7 +128,7 @@ public class OutgoingMessageCapture extends CoreSession.Empty implements CoreSes
}
@Override
- public RetainableByteBufferPool getRetainableByteBufferPool()
+ public ByteBufferPool getByteBufferPool()
{
return bufferPool;
}