MCPcopy
hub / github.com/mongodb/node-mongodb-native / markPinned

Method markPinned

src/cmap/metrics.ts:14–22  ·  view source on GitHub ↗

* Mark a connection as pinned for a specific operation.

(pinType: string)

Source from the content-addressed store, hash-verified

12 * Mark a connection as pinned for a specific operation.
13 */
14 markPinned(pinType: string): void {
15 if (pinType === ConnectionPoolMetrics.TXN) {
16 this.txnConnections += 1;
17 } else if (pinType === ConnectionPoolMetrics.CURSOR) {
18 this.cursorConnections += 1;
19 } else {
20 this.otherConnections += 1;
21 }
22 }
23
24 /**
25 * Unmark a connection as pinned for an operation.

Callers 2

metrics.test.jsFile · 0.80
createConnectionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected