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

Method setUp

lib/host.js:169–183  ·  view source on GitHub ↗

* Marks this host as available for querying. * @param {Boolean} [clearReconnection] * @internal * @ignore

(clearReconnection)

Source from the content-addressed store, hash-verified

167 * @ignore
168 */
169 setUp(clearReconnection) {
170 if (!this.setDownAt) {
171 //The host is already marked as UP
172 return;
173 }
174 this.log('info', `Setting host ${this.address} as UP`);
175 this.setDownAt = 0;
176 this.isUpSince = Date.now();
177 //if it was unhealthy and now it is not, lets reset the reconnection schedule.
178 this.reconnectionSchedule = this.options.policies.reconnection.newSchedule();
179 if (clearReconnection) {
180 this.pool.clearNewConnectionAttempt();
181 }
182 this.emit('up');
183 }
184
185 /**
186 * Resets the reconnectionSchedule and tries to issue a reconnection immediately.

Callers 3

_onNewConnectionOpenMethod · 0.95
host-tests.jsFile · 0.80

Calls 2

newScheduleMethod · 0.80

Tested by

no test coverage detected