Deprecated
(4.2) use org.
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 final ConnPerRoute | connPerRoute
Connections per route |
| protected final LinkedList | freeEntries
The list of free entries. |
| private final Log | |
| protected final int | |
| protected int | numEntries
The number of created entries. |
| protected final HttpRoute | route
The route this pool is for. |
| protected final Queue | waitingThreads
The list of threads waiting for this pool. |
| Access | Constructor and Description |
|---|---|
| public | RouteSpecificPool(final HttpRoute route, final int maxEntries)
Deprecated
(4.1) use
RouteSpecificPool#RouteSpecificPool(HttpRoute, ConnPerRoute)
|
| public | RouteSpecificPool(final HttpRoute
the route for which to pool route, final ConnPerRoute the connections per route configuration connPerRoute)
Deprecated
as a consequence of
Creates a new route-specific pool.
ConnPerRoute being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public BasicPoolEntry | Returns: an available pool entry, ornull if there is none
Deprecated
as a consequence of
Obtains a free entry from this pool, if one is available.
BasicPoolEntry being deprecated.
|
| public void | createdEntry(final BasicPoolEntry
the entry that was created for this pool entry)
Deprecated
as a consequence of
Indicates creation of an entry for this pool.
BasicPoolEntry being deprecated.
|
| public boolean | Returns: true if the entry was found and deleted, or
false if the entry was not foundthe entry to delete from this pool entry)
Deprecated
as a consequence of
Deletes an entry from this pool.
BasicPoolEntry being deprecated.
|
| public void | |
| public void | freeEntry(final BasicPoolEntry
the entry obtained from entry)allocEntry
or presented to createdEntry
Deprecated
as a consequence of
Returns an allocated entry to this pool.
BasicPoolEntry being deprecated.
|
| public int | |
| public final int | Returns: the number of entries for the route of this poolObtains the number of entries. |
| public final int | Returns: the max entry numberObtains the maximum number of entries allowed for this pool. |
| public final HttpRoute | |
| public boolean | Returns: true if there is a waiting thread,
false otherwiseChecks whether there is a waiting thread in this pool. |
| public boolean | Returns: true if this pool is unused,
false otherwiseIndicates whether this pool is unused. |
| public WaitingThread | Returns: a waiting thread, ornull if there is none
Deprecated
as a consequence of
Returns the next thread in the queue.
WaitingThread being deprecated.
|
| public void | queueThread(final WaitingThread
the waiting thread wt)
Deprecated
as a consequence of
Adds a waiting thread.
WaitingThread being deprecated.
|
| public void | removeThread(final WaitingThread
the waiting thread wt)
Deprecated
as a consequence of
Removes a waiting thread, if it is queued.
WaitingThread being deprecated.
|
| connPerRoute | back to summary |
|---|---|
| protected final ConnPerRoute connPerRoute
Deprecated as a consequence of Connections per route | |
| freeEntries | back to summary |
|---|---|
| protected final LinkedList<BasicPoolEntry> freeEntries The list of free entries. This list is managed LIFO, to increase idle times and allow for closing connections that are not really needed. | |
| log | back to summary |
|---|---|
| private final Log log | |
| maxEntries | back to summary |
|---|---|
| protected final int maxEntries | |
| numEntries | back to summary |
|---|---|
| protected int numEntries The number of created entries. | |
| route | back to summary |
|---|---|
| protected final HttpRoute route The route this pool is for. | |
| waitingThreads | back to summary |
|---|---|
| protected final Queue<WaitingThread> waitingThreads The list of threads waiting for this pool. | |
| RouteSpecificPool | back to summary |
|---|---|
| public RouteSpecificPool(final HttpRoute route, final int maxEntries)
Deprecated (4.1) use
| |
| RouteSpecificPool | back to summary |
|---|---|
| public RouteSpecificPool(final HttpRoute route, final ConnPerRoute connPerRoute)
Deprecated as a consequence of Creates a new route-specific pool.
| |
| allocEntry | back to summary |
|---|---|
| public BasicPoolEntry allocEntry(final Object state)
Deprecated as a consequence of Obtains a free entry from this pool, if one is available.
| |
| createdEntry | back to summary |
|---|---|
| public void createdEntry(final BasicPoolEntry entry)
Deprecated as a consequence of Indicates creation of an entry for this pool.
The entry will not be added to the list of free entries,
it is only recognized as belonging to this pool now. It can then
be passed to
| |
| deleteEntry | back to summary |
|---|---|
| public boolean deleteEntry(final BasicPoolEntry entry)
Deprecated as a consequence of Deletes an entry from this pool. Only entries that are currently free in this pool can be deleted. Allocated entries can not be deleted.
| |
| dropEntry | back to summary |
|---|---|
| public void dropEntry() Forgets about an entry from this pool.
This method is used to indicate that an entry
| |
| freeEntry | back to summary |
|---|---|
| public void freeEntry(final BasicPoolEntry entry)
Deprecated as a consequence of Returns an allocated entry to this pool.
| |
| getCapacity | back to summary |
|---|---|
| public int getCapacity() Return remaining capacity of this pool
| |
| getEntryCount | back to summary |
|---|---|
| public final int getEntryCount() Obtains the number of entries. This includes not only the free entries, but also those that have been created and are currently issued to an application.
| |
| getMaxEntries | back to summary |
|---|---|
| public final int getMaxEntries() Obtains the maximum number of entries allowed for this pool.
| |
| getRoute | back to summary |
|---|---|
| public final HttpRoute getRoute() Obtains the route for which this pool is specific.
| |
| hasThread | back to summary |
|---|---|
| public boolean hasThread() Checks whether there is a waiting thread in this pool.
| |
| isUnused | back to summary |
|---|---|
| public boolean isUnused() Indicates whether this pool is unused. A pool is unused if there is neither an entry nor a waiting thread. All entries count, not only the free but also the allocated ones.
| |
| nextThread | back to summary |
|---|---|
| public WaitingThread nextThread()
Deprecated as a consequence of Returns the next thread in the queue.
| |
| queueThread | back to summary |
|---|---|
| public void queueThread(final WaitingThread wt)
Deprecated as a consequence of Adds a waiting thread. This pool makes no attempt to match waiting threads with pool entries. It is the caller's responsibility to check that there is no entry before adding a waiting thread.
| |
| removeThread | back to summary |
|---|---|
| public void removeThread(final WaitingThread wt)
Deprecated as a consequence of Removes a waiting thread, if it is queued.
| |