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