UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

33 lines (22 loc) 1.27 kB
--- lang: en title: 'API docs: pooling.poolfactory' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/extensions/pooling permalink: /doc/en/lb4/apidocs.pooling.poolfactory.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/pooling](./pooling.md) &gt; [PoolFactory](./pooling.poolfactory.md) ## PoolFactory interface Factory for the pooling service <b>Signature:</b> ```typescript export interface PoolFactory<T> extends Factory<T> ``` <b>Extends:</b> Factory&lt;T&gt; ## Methods | Method | Description | | --- | --- | | [acquire(resource, requestCtx)?](./pooling.poolfactory.acquire.md) | <i>(Optional)</i> To be called right after the resource is acquired from the pool. If it fails, the resource will be destroyed from the pool. The method should be used to set up the acquired resource. | | [release(resource)?](./pooling.poolfactory.release.md) | <i>(Optional)</i> To be called right before the resource is released to the pool. If it fails, the resource will be destroyed from the pool. This method should be used to clean up the resource to be returned. |