AbstractConnPool@Deprecated
public class RouteSpecificPool
extends java.lang.Object
ConnPoolByRoute.
The methods in this class are unsynchronized. It is expected that the
containing pool takes care of synchronization.| 限定符和类型 | 字段和说明 |
|---|---|
protected ConnPerRoute |
connPerRoute
已过时。
Connections per route
|
protected java.util.LinkedList<BasicPoolEntry> |
freeEntries
已过时。
The list of free entries.
|
protected int |
maxEntries
已过时。
|
protected int |
numEntries
已过时。
The number of created entries.
|
protected HttpRoute |
route
已过时。
The route this pool is for.
|
protected java.util.Queue<WaitingThread> |
waitingThreads
已过时。
The list of threads waiting for this pool.
|
| 构造器和说明 |
|---|
RouteSpecificPool(HttpRoute route,
ConnPerRoute connPerRoute)
已过时。
Creates a new route-specific pool.
|
RouteSpecificPool(HttpRoute route,
int maxEntries)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
BasicPoolEntry |
allocEntry(java.lang.Object state)
已过时。
Obtains a free entry from this pool, if one is available.
|
void |
createdEntry(BasicPoolEntry entry)
已过时。
Indicates creation of an entry for this pool.
|
boolean |
deleteEntry(BasicPoolEntry entry)
已过时。
Deletes an entry from this pool.
|
void |
dropEntry()
已过时。
Forgets about an entry from this pool.
|
void |
freeEntry(BasicPoolEntry entry)
已过时。
Returns an tlb entry to this pool.
|
int |
getCapacity()
已过时。
Return remaining capacity of this pool
|
int |
getEntryCount()
已过时。
Obtains the number of entries.
|
int |
getMaxEntries()
已过时。
Obtains the maximum number of entries allowed for this pool.
|
HttpRoute |
getRoute()
已过时。
Obtains the route for which this pool is specific.
|
boolean |
hasThread()
已过时。
Checks whether there is a waiting thread in this pool.
|
boolean |
isUnused()
已过时。
Indicates whether this pool is unused.
|
WaitingThread |
nextThread()
已过时。
Returns the next thread in the queue.
|
void |
queueThread(WaitingThread wt)
已过时。
Adds a waiting thread.
|
void |
removeThread(WaitingThread wt)
已过时。
Removes a waiting thread, if it is queued.
|
protected final HttpRoute route
protected final int maxEntries
protected final ConnPerRoute connPerRoute
protected final java.util.LinkedList<BasicPoolEntry> freeEntries
protected final java.util.Queue<WaitingThread> waitingThreads
protected int numEntries
public RouteSpecificPool(HttpRoute route, int maxEntries)
RouteSpecificPool(HttpRoute, ConnPerRoute)public RouteSpecificPool(HttpRoute route, ConnPerRoute connPerRoute)
route - the route for which to poolconnPerRoute - the connections per route configurationpublic final HttpRoute getRoute()
public final int getMaxEntries()
public boolean isUnused()
true if this pool is unused,
false otherwisepublic int getCapacity()
public final int getEntryCount()
public BasicPoolEntry allocEntry(java.lang.Object state)
null if there is nonepublic void freeEntry(BasicPoolEntry entry)
entry - the entry obtained from allocEntry
or presented to createdEntrypublic void createdEntry(BasicPoolEntry entry)
freeEntry.entry - the entry that was created for this poolpublic boolean deleteEntry(BasicPoolEntry entry)
entry - the entry to delete from this pooltrue if the entry was found and deleted, or
false if the entry was not foundpublic void dropEntry()
tlb
from this pool has been lost and will not be returned.public void queueThread(WaitingThread wt)
wt - the waiting threadpublic boolean hasThread()
true if there is a waiting thread,
false otherwisepublic WaitingThread nextThread()
null if there is nonepublic void removeThread(WaitingThread wt)
wt - the waiting thread