public class HttpConnectionPoolManager extends CrtResource
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_BUFFER_SIZE |
static int |
DEFAULT_MAX_CONNECTIONS |
static int |
DEFAULT_MAX_WINDOW_SIZE |
Constructor and Description |
---|
HttpConnectionPoolManager(ClientBootstrap clientBootstrap,
SocketOptions socketOptions,
TlsContext tlsContext,
URI uri) |
HttpConnectionPoolManager(ClientBootstrap clientBootstrap,
SocketOptions socketOptions,
TlsContext tlsContext,
URI uri,
int bufferSize,
int windowSize,
int maxConnections) |
Modifier and Type | Method and Description |
---|---|
protected CompletableFuture<CrtByteBuffer> |
acquireBuffer() |
CompletableFuture<HttpConnection> |
acquireConnection()
Request a HttpConnection from the Connection Pool.
|
void |
close()
Closes this Connection Pool and any pending Connection Acquisitions
|
int |
getMaxConnections()
Getter methods
|
URI |
getUri() |
int |
getWindowSize() |
void |
releaseConnection(HttpConnection conn)
Releases this HttpConnection back into the Connection Pool, and allows another Request to acquire this connection.
|
protected void |
releaseConnectionPointer(long connection_ptr) |
acquire, getAllocatedNativeResourceCount, getAllocatedNativeResources, isNull, native_ptr, own, release
public static final int DEFAULT_MAX_BUFFER_SIZE
public static final int DEFAULT_MAX_WINDOW_SIZE
public static final int DEFAULT_MAX_CONNECTIONS
public HttpConnectionPoolManager(ClientBootstrap clientBootstrap, SocketOptions socketOptions, TlsContext tlsContext, URI uri)
public HttpConnectionPoolManager(ClientBootstrap clientBootstrap, SocketOptions socketOptions, TlsContext tlsContext, URI uri, int bufferSize, int windowSize, int maxConnections)
protected CompletableFuture<CrtByteBuffer> acquireBuffer()
public CompletableFuture<HttpConnection> acquireConnection()
public void releaseConnection(HttpConnection conn)
conn
- protected void releaseConnectionPointer(long connection_ptr)
public void close()
close
in interface AutoCloseable
close
in class CrtResource
public int getMaxConnections()
public int getWindowSize()
public URI getUri()
Copyright © 2019. All rights reserved.