MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / constructor

Method constructor

lib/stream-id-stack.js:68–82  ·  view source on GitHub ↗

* Creates a new instance of StreamIdStack. * @param {number} version Protocol version * @constructor

(version)

Source from the content-addressed store, hash-verified

66 * @constructor
67 */
68 constructor(version) {
69 //Ecmascript Number is 64-bit double, it can be optimized by the engine into a 32-bit int, but nothing below that.
70 //We try to allocate as few as possible in arrays of 128
71 this.currentGroup = generateGroup(0);
72 this.groupIndex = 0;
73 this.groups = [this.currentGroup];
74 this.releaseTimeout = null;
75 this.setVersion(version);
76 /**
77 * Returns the amount of ids currently in use
78 * @member {number}
79 */
80 this.inUse = 0;
81 this.releaseDelay = defaultReleaseDelay;
82 }
83
84 /**
85 * Sets the protocol version

Callers

nothing calls this directly

Calls 2

setVersionMethod · 0.95
generateGroupFunction · 0.85

Tested by

no test coverage detected