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

Method refreshKeyspaces

lib/metadata/index.js:252–265  ·  view source on GitHub ↗

* Gets the metadata information of all the keyspaces and updates the internal state of the driver. * * If a callback is provided, the callback is invoked when the keyspace metadata refresh completes. * Otherwise, it returns a Promise . * * @param

(waitReconnect, callback)

Source from the content-addressed store, hash-verified

250 * @param {Function} [callback] Optional callback.
251 */
252 refreshKeyspaces(waitReconnect, callback) {
253 if (typeof waitReconnect === 'function' || typeof waitReconnect === 'undefined') {
254 callback = waitReconnect;
255 waitReconnect = true;
256 }
257 if (!this.initialized) {
258 const err = this._uninitializedError();
259 if (callback) {
260 return callback(err);
261 }
262 return Promise.reject(err);
263 }
264 return promiseUtils.optionalCallback(this.refreshKeyspacesInternal(waitReconnect), callback);
265 }
266
267 /**
268 * @param {Boolean} waitReconnect

Callers

nothing calls this directly

Calls 2

_uninitializedErrorMethod · 0.95

Tested by

no test coverage detected