Package org.apache.hc.core5.pool
Class LaxConnPool.PerRoutePool<T,C extends ModalCloseable>
java.lang.Object
org.apache.hc.core5.pool.LaxConnPool.PerRoutePool<T,C>
- Enclosing class:
LaxConnPool<T,
C extends ModalCloseable>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicInteger
private final Deque
<AtomicMarkableReference<PoolEntry<T, C>>> private final ConnPoolListener
<T> private final ConnPoolStats
<T> private final DisposalCallback
<C> private final ConcurrentMap
<PoolEntry<T, C>, Boolean> private int
private final Deque
<LaxConnPool.LeaseRequest<T, C>> private final PoolReusePolicy
private final AtomicLong
private final T
private final AtomicBoolean
private final TimeValue
-
Constructor Summary
ConstructorsConstructorDescriptionPerRoutePool
(T route, int max, TimeValue timeToLive, PoolReusePolicy policy, ConnPoolStats<T> connPoolStats, DisposalCallback<C> disposalCallback, ConnPoolListener<T> connPoolListener) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
void
enumAvailable
(Callback<PoolEntry<T, C>> callback) void
enumLeased
(Callback<PoolEntry<T, C>> callback) int
getAvailableEntry
(Object state) int
int
getMax()
int
final T
getRoute()
void
private void
removeLeased
(PoolEntry<T, C> entry) private void
private void
servicePendingRequests
(LaxConnPool.PerRoutePool.RequestServiceStrategy serviceStrategy) void
setMax
(int max) void
toString()
void
-
Field Details
-
route
-
timeToLive
-
policy
-
disposalCallback
-
connPoolListener
-
connPoolStats
-
leased
-
available
-
pending
-
terminated
-
allocated
-
releaseSeqNum
-
max
private volatile int max
-
-
Constructor Details
-
PerRoutePool
PerRoutePool(T route, int max, TimeValue timeToLive, PoolReusePolicy policy, ConnPoolStats<T> connPoolStats, DisposalCallback<C> disposalCallback, ConnPoolListener<T> connPoolListener)
-
-
Method Details
-
shutdown
-
createPoolEntry
-
deallocatePoolEntry
private void deallocatePoolEntry() -
addLeased
-
removeLeased
-
getAvailableEntry
-
lease
-
release
-
servicePendingRequest
private void servicePendingRequest() -
servicePendingRequests
private void servicePendingRequests(LaxConnPool.PerRoutePool.RequestServiceStrategy serviceStrategy) -
validatePendingRequests
public void validatePendingRequests() -
getRoute
-
getMax
public int getMax() -
setMax
public void setMax(int max) -
getPendingCount
public int getPendingCount() -
getLeasedCount
public int getLeasedCount() -
getAvailableCount
public int getAvailableCount() -
enumAvailable
-
enumLeased
-
toString
-