* 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)
| 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 |
nothing calls this directly
no test coverage detected