T - routeC - connection object@Contract(threading=SAFE) @Experimental public class H2SharingConnPool<T,C extends HttpConnection> extends Object implements ManagedConnPool<T,C>
ManagedConnPool and shares already leased connections to multiplex
message exchanges over active HTTP/2 connections.| Constructor and Description |
|---|
H2SharingConnPool(ManagedConnPool<T,C> pool) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
close(CloseMode closeMode) |
void |
closeExpired() |
void |
closeIdle(TimeValue idleTime) |
int |
getDefaultMaxPerRoute() |
int |
getMaxPerRoute(T route) |
int |
getMaxTotal() |
Set<T> |
getRoutes() |
PoolStats |
getStats(T route) |
PoolStats |
getTotalStats() |
Future<PoolEntry<T,C>> |
lease(T route,
Object state,
Timeout requestTimeout,
FutureCallback<PoolEntry<T,C>> callback) |
void |
release(PoolEntry<T,C> entry,
boolean reusable) |
void |
setDefaultMaxPerRoute(int max) |
void |
setMaxPerRoute(T route,
int max) |
void |
setMaxTotal(int max) |
String |
toString() |
public H2SharingConnPool(ManagedConnPool<T,C> pool)
public void close(CloseMode closeMode)
close in interface ModalCloseablepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic Future<PoolEntry<T,C>> lease(T route, Object state, Timeout requestTimeout, FutureCallback<PoolEntry<T,C>> callback)
lease in interface ConnPool<T,C extends HttpConnection>public void release(PoolEntry<T,C> entry, boolean reusable)
release in interface ConnPool<T,C extends HttpConnection>public void setMaxTotal(int max)
setMaxTotal in interface ConnPoolControl<T>public int getMaxTotal()
getMaxTotal in interface ConnPoolControl<T>public void setDefaultMaxPerRoute(int max)
setDefaultMaxPerRoute in interface ConnPoolControl<T>public int getDefaultMaxPerRoute()
getDefaultMaxPerRoute in interface ConnPoolControl<T>public void setMaxPerRoute(T route, int max)
setMaxPerRoute in interface ConnPoolControl<T>public int getMaxPerRoute(T route)
getMaxPerRoute in interface ConnPoolControl<T>public void closeIdle(TimeValue idleTime)
closeIdle in interface ConnPoolControl<T>public void closeExpired()
closeExpired in interface ConnPoolControl<T>public Set<T> getRoutes()
getRoutes in interface ConnPoolControl<T>public PoolStats getTotalStats()
getTotalStats in interface ConnPoolStats<T>public PoolStats getStats(T route)
getStats in interface ConnPoolStats<T>Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.