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

Method _setReadEnded

lib/concurrent/index.js:253–266  ·  view source on GitHub ↗

* Marks the stream read process as ended. * @param {Error} [err] The stream read error. * @private

(err)

Source from the content-addressed store, hash-verified

251 * @private
252 */
253 _setReadEnded(err) {
254 if (!this._readEnded) {
255 this._readEnded = true;
256
257 if (err) {
258 // There was an error while reading from the input stream.
259 // This should be surfaced as a failure
260 this._rejectCallback(err);
261 } else if (this._inFlight === 0) {
262 // Ended signaled and there are no more pending messages.
263 this._resolveCallback(this._result);
264 }
265 }
266 }
267
268 _setError(index, err) {
269 this._result.setError(index, err);

Callers 2

executeMethod · 0.95
_executeOneMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected