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

Method _getKeyspaceReplicas

lib/metadata/index.js:285–292  ·  view source on GitHub ↗
(keyspace)

Source from the content-addressed store, hash-verified

283 }
284
285 _getKeyspaceReplicas(keyspace) {
286 if (!keyspace.replicas) {
287 //Calculate replicas the first time for the keyspace
288 keyspace.replicas =
289 keyspace.tokenToReplica(this.tokenizer, this.ringTokensAsStrings, this.primaryReplicas, this.datacenters);
290 }
291 return keyspace.replicas;
292 }
293
294 /**
295 * Gets the host list representing the replicas that contain the given partition key, token or token range.

Callers 2

getReplicasMethod · 0.95
getTokenRangesForHostMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected