UNPKG

@loopback/docs

Version:

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

35 lines (22 loc) 1.06 kB
--- lang: en title: 'API docs: pooling.poolable.acquire' 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.poolable.acquire.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/pooling](./pooling.md) &gt; [Poolable](./pooling.poolable.md) &gt; [acquire](./pooling.poolable.acquire.md) ## Poolable.acquire() method 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. <b>Signature:</b> ```typescript acquire?(requestCtx: Context): ValueOrPromise<void>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | requestCtx | [Context](./context.context.md) | | <b>Returns:</b> [ValueOrPromise](./context.valueorpromise.md)<!-- -->&lt;void&gt;