Package org.apache.http.impl.conn
Class CPool
java.lang.Object
org.apache.http.pool.AbstractConnPool<HttpRoute,ManagedHttpClientConnection,CPoolEntry>
org.apache.http.impl.conn.CPool
- All Implemented Interfaces:
org.apache.http.pool.ConnPool<HttpRoute,
,CPoolEntry> org.apache.http.pool.ConnPoolControl<HttpRoute>
@Contract(threading=SAFE)
class CPool
extends org.apache.http.pool.AbstractConnPool<HttpRoute,ManagedHttpClientConnection,CPoolEntry>
- Since:
- 4.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AtomicLong
private final org.apache.commons.logging.Log
private final long
private final TimeUnit
-
Constructor Summary
ConstructorsConstructorDescriptionCPool
(org.apache.http.pool.ConnFactory<HttpRoute, ManagedHttpClientConnection> connFactory, int defaultMaxPerRoute, int maxTotal, long timeToLive, TimeUnit timeUnit) -
Method Summary
Modifier and TypeMethodDescriptionprotected CPoolEntry
createEntry
(HttpRoute route, ManagedHttpClientConnection conn) protected void
enumAvailable
(org.apache.http.pool.PoolEntryCallback<HttpRoute, ManagedHttpClientConnection> callback) protected void
enumLeased
(org.apache.http.pool.PoolEntryCallback<HttpRoute, ManagedHttpClientConnection> callback) protected boolean
validate
(CPoolEntry entry) Methods inherited from class org.apache.http.pool.AbstractConnPool
closeExpired, closeIdle, getDefaultMaxPerRoute, getMaxPerRoute, getMaxTotal, getRoutes, getStats, getTotalStats, getValidateAfterInactivity, isShutdown, lease, lease, onLease, onRelease, onReuse, release, setDefaultMaxPerRoute, setMaxPerRoute, setMaxTotal, setValidateAfterInactivity, shutdown, toString
-
Field Details
-
COUNTER
-
log
private final org.apache.commons.logging.Log log -
timeToLive
private final long timeToLive -
timeUnit
-
-
Constructor Details
-
CPool
public CPool(org.apache.http.pool.ConnFactory<HttpRoute, ManagedHttpClientConnection> connFactory, int defaultMaxPerRoute, int maxTotal, long timeToLive, TimeUnit timeUnit)
-
-
Method Details
-
createEntry
- Specified by:
createEntry
in classorg.apache.http.pool.AbstractConnPool<HttpRoute,
ManagedHttpClientConnection, CPoolEntry>
-
validate
- Overrides:
validate
in classorg.apache.http.pool.AbstractConnPool<HttpRoute,
ManagedHttpClientConnection, CPoolEntry>
-
enumAvailable
protected void enumAvailable(org.apache.http.pool.PoolEntryCallback<HttpRoute, ManagedHttpClientConnection> callback) - Overrides:
enumAvailable
in classorg.apache.http.pool.AbstractConnPool<HttpRoute,
ManagedHttpClientConnection, CPoolEntry>
-
enumLeased
protected void enumLeased(org.apache.http.pool.PoolEntryCallback<HttpRoute, ManagedHttpClientConnection> callback) - Overrides:
enumLeased
in classorg.apache.http.pool.AbstractConnPool<HttpRoute,
ManagedHttpClientConnection, CPoolEntry>
-