public interface PooledRef<POOLABLE>
Pool, which holds the underlying
POOLABLEobject and allows one to manually
release()it to the pool or
invalidate()it. Through its
PooledRefprovides a few additional information about its lifecycle, like its age and the number of times it has been acquired, so the
Poolmay optionally use that information to automatically invalidate the object, and provide a simplified acquire mechanism where the
PooledRefis not directly exposed (see
|Modifier and Type||Method and Description|
Returns the wrapped
POOLABLE. This method is not thread-safe and the poolable should NEVER be accessed concurrently.
PooledRefMetadataobject that holds more information about the reference (rather than the
poolable()), like how many time it was acquired, its age (time since allocation), etc...
Monothat triggers the asynchronous invalidation of the
POOLABLEwhen subscribed. The object is always discarded by the pool and not further reused.
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.
Monothat, once subscribed, will release the
POOLABLEback to the pool asynchronously.
This method is idempotent (subsequent subscriptions to the same Mono, or re-invocations of the method are NO-OP).
Monothat will complete empty when the object has been released. In case of an error the object is always discarded