| Modifier and Type | Field and Description |
|---|---|
| public static final Function | EVENT_LOOP_CONTEXT_PROVIDER
This provider reuse the context argument when it can be cast or unwrapped to an event-loop context, otherwise it returns a new event-loop context that reuses the Netty event-loop of the context argument. |
| Modifier and Type | Method and Description |
|---|---|
| public void | acquire(ContextInternal
the context context, int the connection kind wanted which is an index in the max size array provided when constructing the pool kind, Handler<AsyncResult<Lease<C>>> the callback handler with the result handler)Acquire a connection from the pool. |
| public void | acquire(ContextInternal
the context context, PoolWaiter.the waiter event listener listener,the connection kind wanted which is an index in the max size array provided when constructing the pool kind, Handler<AsyncResult<Lease<C>>> the callback handler with the result handler)Acquire a connection from the pool. |
| public void | cancel(PoolWaiter<C>
the waiter to cancel waiter, Handler<AsyncResult<Boolean>> the completion handler handler)Cancel a waiter. |
| public int | Returns: the pool capacity - the program should not use the value to take decisions, this can be used for statistic or testing purpose
|
| public void | close(Handler<AsyncResult<List<Future<C>>>>
the callback handler with the result handler)Close the pool. |
| public ConnectionPool | Returns: a reference to this, so the API can be used fluentlythe selector function selector)Set a |
| public ConnectionPool | Returns: a reference to this, so the API can be used fluentlythe provider to be used by the pool contextProvider)Set a function that provides an event-loop context out of the specified context. |
| public void | evict(Predicate<C>
to determine whether a connection should be evicted predicate, Handler<AsyncResult<List<C>>> the callback handler with the result handler) Evict connections from the pool with a |
| public static <C> ConnectionPool | |
| public static <C> ConnectionPool | |
| public int | Returns: the number of in-flight requests - the program should not use the value to take decisions, this can be used for statistic or testing purpose
|
| public int | Returns: the number of managed connections - the program should not use the value to take decisions, this can be used for statistic or testing purpose
|
| public int | Returns: the number of waiters - the program should not use the value to take decisions, this can be used for statistic or testing purpose
|
| EVENT_LOOP_CONTEXT_PROVIDER | back to summary |
|---|---|
| public static final Function<ContextInternal, ContextInternal> EVENT_LOOP_CONTEXT_PROVIDER This provider reuse the context argument when it can be cast or unwrapped to an event-loop context, otherwise it returns a new event-loop context that reuses the Netty event-loop of the context argument. | |
| acquire | back to summary |
|---|---|
| public void acquire(ContextInternal context, int kind, Handler<AsyncResult<Lease<C>>> handler) Acquire a connection from the pool.
| |
| acquire | back to summary |
|---|---|
| public void acquire(ContextInternal context, PoolWaiter. Acquire a connection from the pool.
| |
| cancel | back to summary |
|---|---|
| public void cancel(PoolWaiter<C> waiter, Handler<AsyncResult<Boolean>> handler) Cancel a waiter. The completion
| |
| capacity | back to summary |
|---|---|
public int capacity()
| |
| close | back to summary |
|---|---|
| public void close(Handler<AsyncResult<List<Future<C>>>> handler) Close the pool. This will not close the connections, instead a list of connections to be closed is returned
to the completion
| |
| connectionSelector | back to summary |
|---|---|
| public ConnectionPool Set a The selector is called with the waiter and a list of candidate connections,
the selector must return a connection with a positive The selector can return
| |
| contextProvider | back to summary |
|---|---|
| public ConnectionPool Set a function that provides an event-loop context out of the specified context. The pool will use the provider when an event-loop context is required for creating a new connection. The default provider is
| |
| evict | back to summary |
|---|---|
| public void evict(Predicate<C> predicate, Handler<AsyncResult<List<C>>> handler) Evict connections from the pool with a The operation returns the list of connections evicted from the pool as is.
| |
| pool | back to summary |
|---|---|
| public static <C> ConnectionPool | |
| pool | back to summary |
|---|---|
| public static <C> ConnectionPool | |
| requests | back to summary |
|---|---|
public int requests()
| |
| size | back to summary |
|---|---|
public int size()
| |
| waiters | back to summary |
|---|---|
public int waiters()
| |