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

Method getBlock

lib/tokenizer.js:249–258  ·  view source on GitHub ↗

* * @param {Array } key * @param {Number} offset * @param {Number} index * @return {MutableLong}

(key, offset, index)

Source from the content-addressed store, hash-verified

247 * @return {MutableLong}
248 */
249 getBlock(key, offset, index) {
250 const i8 = index << 3;
251 const blockOffset = offset + i8;
252 return new MutableLong(
253 (key[blockOffset]) | (key[blockOffset + 1] << 8),
254 (key[blockOffset + 2]) | (key[blockOffset + 3] << 8),
255 (key[blockOffset + 4]) | (key[blockOffset + 5] << 8),
256 (key[blockOffset + 6]) | (key[blockOffset + 7] << 8)
257 );
258 }
259
260 /**
261 * @param {MutableLong} v

Callers 2

hashMethod · 0.95
tokenizer-tests.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected