Pool, which holds the underlying POOLABLE object and allows one to
manually release() it to the pool or invalidate() it. Through its metadata(),
the PooledRef provides a few additional information about its lifecycle, like its age and the number of times
it has been acquired, so the Pool may optionally use that information to automatically invalidate
the object, and provide a simplified acquire mechanism where the PooledRef is not directly exposed (see
Pool#withPoolable(Function) vs Pool#acquire()).
| Modifier and Type | Method and Description |
|---|---|
| public Mono | invalidate()
Return a |
| public PooledRefMetadata | metadata()
Returns a |
| public POOLABLE | |
| public Mono |
| invalidate | back to summary |
|---|---|
| public Mono Return a This is useful when the unhealthy state of the resource (or lack of re-usability) is detected through the usage of the resource, as opposed to its exposed state.
Note that if | |
| metadata | back to summary |
|---|---|
| public PooledRefMetadata metadata() Returns a
Note that if
| |
| poolable | back to summary |
|---|---|
| public POOLABLE poolable() Returns the wrapped
The reference is retained by the
| |
| release | back to summary |
|---|---|
| public Mono Return a
This method is idempotent (subsequent subscriptions to the same Mono, or re-invocations of the method
are NO-OP). It is also no-op if | |