| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final LinkedList | |
| private final ConcurrentLinkedQueue | |
| private final ConnPoolListener | |
| private volatile int | |
| private final DisposalCallback | |
| private final AtomicBoolean | |
| private final Set | |
| private final Lock | |
| private final Map | |
| private volatile int | |
| private final LinkedList | |
| private final PoolReusePolicy | |
| private final Map | |
| private final TimeValue |
| Access | Constructor and Description |
|---|---|
| public | StrictConnPool(final int defaultMaxPerRoute, final int maxTotal, final TimeValue timeToLive, final PoolReusePolicy policy, final DisposalCallback<C> disposalCallback, final ConnPoolListener<T> connPoolListener)
|
| public | StrictConnPool(final int defaultMaxPerRoute, final int maxTotal, final TimeValue timeToLive, final PoolReusePolicy policy, final ConnPoolListener<T> connPoolListener)
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close(final CloseMode
How to close the receiver. closeMode)Implements org. |
| public void | close()
Implements java. |
| public void | |
| public void | |
| public void | |
| public void | |
| private void | |
| public int | |
| private int | |
| public int | |
| public int | |
| private StrictConnPool. | |
| public Set | getRoutes()
Implements org. |
| public PoolStats | |
| public PoolStats | |
| public boolean | |
| public Future | lease(final T
route of the connection. route, final Object arbitrary object that represents a particular state
(usually a security principal or a unique token identifying
the user whose credentials have been used while establishing the connection).
May be state, final Timeout null.request timeout. In case of a timeout the request
can get automatically cancelled by the pool. requestTimeout, final FutureCallback<PoolEntry<T, C>> operation completion callback. callback)Implements org. |
| public Future | |
| private void | |
| private boolean | |
| private void | |
| private void | |
| public void | release(final PoolEntry<T, C>
pool entry leased from the pool entry, final boolean flag indicating whether or not the released connection
is in a consistent state and is safe for further use. reusable)Implements org. |
| public void | setDefaultMaxPerRoute(final int max)
Implements org. |
| public void | setMaxPerRoute(final T route, final int max)
Implements org. |
| public void | |
| public String | |
| public void |
| available | back to summary |
|---|---|
| private final LinkedList<PoolEntry<T, C>> available | |
| completedRequests | back to summary |
|---|---|
| private final ConcurrentLinkedQueue<StrictConnPool. | |
| connPoolListener | back to summary |
|---|---|
| private final ConnPoolListener<T> connPoolListener | |
| defaultMaxPerRoute | back to summary |
|---|---|
| private volatile int defaultMaxPerRoute | |
| disposalCallback | back to summary |
|---|---|
| private final DisposalCallback<C> disposalCallback | |
| isShutDown | back to summary |
|---|---|
| private final AtomicBoolean isShutDown | |
| leased | back to summary |
|---|---|
| private final Set<PoolEntry<T, C>> leased | |
| lock | back to summary |
|---|---|
| private final Lock lock | |
| maxPerRoute | back to summary |
|---|---|
| private final Map<T, Integer> maxPerRoute | |
| maxTotal | back to summary |
|---|---|
| private volatile int maxTotal | |
| pendingRequests | back to summary |
|---|---|
| private final LinkedList<StrictConnPool. | |
| policy | back to summary |
|---|---|
| private final PoolReusePolicy policy | |
| routeToPool | back to summary |
|---|---|
| private final Map<T, StrictConnPool. | |
| timeToLive | back to summary |
|---|---|
| private final TimeValue timeToLive | |
| StrictConnPool | back to summary |
|---|---|
public StrictConnPool(final int defaultMaxPerRoute, final int maxTotal, final TimeValue timeToLive, final PoolReusePolicy policy, final DisposalCallback<C> disposalCallback, final ConnPoolListener<T> connPoolListener)
| |
| StrictConnPool | back to summary |
|---|---|
public StrictConnPool(final int defaultMaxPerRoute, final int maxTotal, final TimeValue timeToLive, final PoolReusePolicy policy, final ConnPoolListener<T> connPoolListener)
| |
| StrictConnPool | back to summary |
|---|---|
| public StrictConnPool(final int defaultMaxPerRoute, final int maxTotal) | |
| close | back to summary |
|---|---|
| public void close(final CloseMode closeMode) Implements org. Doc from org. Closes this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect. | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| closeExpired | back to summary |
|---|---|
| public void closeExpired() Implements org.
| |
| closeIdle | back to summary |
|---|---|
| public void closeIdle(final TimeValue idleTime) Implements org.
| |
| enumAvailable | back to summary |
|---|---|
| public void enumAvailable(final Callback<PoolEntry<T, C>> callback) Enumerates all available connections.
| |
| enumLeased | back to summary |
|---|---|
| public void enumLeased(final Callback<PoolEntry<T, C>> callback) Enumerates all leased connections.
| |
| fireCallbacks | back to summary |
|---|---|
| private void fireCallbacks() | |
| getDefaultMaxPerRoute | back to summary |
|---|---|
| public int getDefaultMaxPerRoute() Implements org.
| |
| getMax | back to summary |
|---|---|
| private int getMax(final T route) | |
| getMaxPerRoute | back to summary |
|---|---|
| public int getMaxPerRoute(final T route) Implements org.
| |
| getMaxTotal | back to summary |
|---|---|
| public int getMaxTotal() Implements org.
| |
| getPool | back to summary |
|---|---|
| private StrictConnPool. | |
| getRoutes | back to summary |
|---|---|
| public Set Implements org. Returns snapshot of all knows routes
| |
| getStats | back to summary |
|---|---|
| public PoolStats getStats(final T route) Implements org.
| |
| getTotalStats | back to summary |
|---|---|
| public PoolStats getTotalStats() Implements org.
| |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown() | |
| lease | back to summary |
|---|---|
| public Future Implements org. Doc from org. Attempts to lease a connection for the given route and with the given state from the pool. Please note the connection request can get automatically cancelled by the pool in case of a request timeout.
| |
| lease | back to summary |
|---|---|
| public Future | |
| processNextPendingRequest | back to summary |
|---|---|
| private void processNextPendingRequest() | |
| processPendingRequest | back to summary |
|---|---|
| private boolean processPendingRequest(final StrictConnPool. | |
| processPendingRequests | back to summary |
|---|---|
| private void processPendingRequests() | |
| purgePoolMap | back to summary |
|---|---|
| private void purgePoolMap() | |
| release | back to summary |
|---|---|
| public void release(final PoolEntry<T, C> entry, final boolean reusable) Implements org. Doc from org. Releases the pool entry back to the pool. | |
| setDefaultMaxPerRoute | back to summary |
|---|---|
| public void setDefaultMaxPerRoute(final int max) Implements org.
| |
| setMaxPerRoute | back to summary |
|---|---|
| public void setMaxPerRoute(final T route, final int max) Implements org.
| |
| setMaxTotal | back to summary |
|---|---|
| public void setMaxTotal(final int max) Implements org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| validatePendingRequests | back to summary |
|---|---|
| public void validatePendingRequests() | |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicBoolean | |
| private final Deadline | |
| private volatile Exception | |
| private final BasicFuture | |
| private volatile PoolEntry | |
| private final T | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| public | LeaseRequest(final T
route route, final Object state state, final Timeout timeout to wait in a request queue until kicked off requestTimeout, final BasicFuture<PoolEntry<T, C>> future callback future)Constructor |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public Deadline | |
| public Exception | |
| public BasicFuture | |
| public PoolEntry | |
| public T | |
| public Object | |
| public boolean | |
| public String |
| completed | back to summary |
|---|---|
| private final AtomicBoolean completed | |
| deadline | back to summary |
|---|---|
| private final Deadline deadline | |
| ex | back to summary |
|---|---|
| private volatile Exception ex | |
| future | back to summary |
|---|---|
| private final BasicFuture<PoolEntry<T, C>> future | |
| result | back to summary |
|---|---|
| private volatile PoolEntry<T, C> result | |
| route | back to summary |
|---|---|
| private final T route | |
| state | back to summary |
|---|---|
| private final Object state | |
| LeaseRequest | back to summary |
|---|---|
| public LeaseRequest(final T route, final Object state, final Timeout requestTimeout, final BasicFuture<PoolEntry<T, C>> future) Constructor
| |
| completed | back to summary |
|---|---|
| public void completed(final PoolEntry<T, C> result) | |
| failed | back to summary |
|---|---|
| public void failed(final Exception ex) | |
| getDeadline | back to summary |
|---|---|
| public Deadline getDeadline() | |
| getException | back to summary |
|---|---|
| public Exception getException() | |
| getFuture | back to summary |
|---|---|
| public BasicFuture | |
| getResult | back to summary |
|---|---|
| public PoolEntry | |
| getRoute | back to summary |
|---|---|
| public T getRoute() | |
| getState | back to summary |
|---|---|
| public Object getState() | |
| isDone | back to summary |
|---|---|
| public boolean isDone() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private final LinkedList | |
| private final DisposalCallback | |
| private final Set | |
| private final T |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public PoolEntry | |
| public void | |
| public int | |
| public int | |
| public PoolEntry | |
| public PoolEntry | |
| public int | |
| public final T | |
| public boolean | |
| public void | |
| public String |
| available | back to summary |
|---|---|
| private final LinkedList<PoolEntry<T, C>> available | |
| disposalCallback | back to summary |
|---|---|
| private final DisposalCallback<C> disposalCallback | |
| leased | back to summary |
|---|---|
| private final Set<PoolEntry<T, C>> leased | |
| route | back to summary |
|---|---|
| private final T route | |
| PerRoutePool | back to summary |
|---|---|
| pack-priv PerRoutePool(final T route, final DisposalCallback<C> disposalCallback) | |
| createEntry | back to summary |
|---|---|
| public PoolEntry | |
| free | back to summary |
|---|---|
| public void free(final PoolEntry<T, C> entry, final boolean reusable) | |
| getAllocatedCount | back to summary |
|---|---|
| public int getAllocatedCount() | |
| getAvailableCount | back to summary |
|---|---|
| public int getAvailableCount() | |
| getFree | back to summary |
|---|---|
| public PoolEntry | |
| getLastUsed | back to summary |
|---|---|
| public PoolEntry | |
| getLeasedCount | back to summary |
|---|---|
| public int getLeasedCount() | |
| getRoute | back to summary |
|---|---|
| public final T getRoute() | |
| remove | back to summary |
|---|---|
| public boolean remove(final PoolEntry<T, C> entry) | |
| shutdown | back to summary |
|---|---|
| public void shutdown(final CloseMode closeMode) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |