AbstractConnPool
@Deprecated public class RouteSpecificPool extends Object
ConnPoolByRoute
.
The methods in this class are unsynchronized. It is expected that the
containing pool takes care of synchronization.Modifier and Type | Field and Description |
---|---|
protected ConnPerRoute |
connPerRoute
Deprecated.
Connections per route
|
protected LinkedList<BasicPoolEntry> |
freeEntries
Deprecated.
The list of free entries.
|
protected int |
maxEntries
Deprecated.
|
protected int |
numEntries
Deprecated.
The number of created entries.
|
protected HttpRoute |
route
Deprecated.
The route this pool is for.
|
protected Queue<WaitingThread> |
waitingThreads
Deprecated.
The list of threads waiting for this pool.
|
Constructor and Description |
---|
RouteSpecificPool(HttpRoute route,
ConnPerRoute connPerRoute)
Deprecated.
Creates a new route-specific pool.
|
RouteSpecificPool(HttpRoute route,
int maxEntries)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
BasicPoolEntry |
allocEntry(Object state)
Deprecated.
Obtains a free entry from this pool, if one is available.
|
void |
createdEntry(BasicPoolEntry entry)
Deprecated.
Indicates creation of an entry for this pool.
|
boolean |
deleteEntry(BasicPoolEntry entry)
Deprecated.
Deletes an entry from this pool.
|
void |
dropEntry()
Deprecated.
Forgets about an entry from this pool.
|
void |
freeEntry(BasicPoolEntry entry)
Deprecated.
Returns an allocated entry to this pool.
|
int |
getCapacity()
Deprecated.
Return remaining capacity of this pool
|
int |
getEntryCount()
Deprecated.
Obtains the number of entries.
|
int |
getMaxEntries()
Deprecated.
Obtains the maximum number of entries allowed for this pool.
|
HttpRoute |
getRoute()
Deprecated.
Obtains the route for which this pool is specific.
|
boolean |
hasThread()
Deprecated.
Checks whether there is a waiting thread in this pool.
|
boolean |
isUnused()
Deprecated.
Indicates whether this pool is unused.
|
WaitingThread |
nextThread()
Deprecated.
Returns the next thread in the queue.
|
void |
queueThread(WaitingThread wt)
Deprecated.
Adds a waiting thread.
|
void |
removeThread(WaitingThread wt)
Deprecated.
Removes a waiting thread, if it is queued.
|
protected final HttpRoute route
protected final int maxEntries
protected final ConnPerRoute connPerRoute
protected final LinkedList<BasicPoolEntry> freeEntries
protected final Queue<WaitingThread> waitingThreads
protected int numEntries
@Deprecated 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(Object state)
null
if there is nonepublic void freeEntry(BasicPoolEntry entry)
entry
- the entry obtained from allocEntry
or presented to createdEntry
public 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()
allocated
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 threadCopyright © 1999–2022 The Apache Software Foundation. All rights reserved.