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

Method push

lib/writers.js:208–220  ·  view source on GitHub ↗

* Enqueues a new request * @param {OperationState} operation * @param {Function} callback The write callback.

(operation, callback)

Source from the content-addressed store, hash-verified

206 * @param {Function} callback The write callback.
207 */
208 push(operation, callback) {
209 const self = this;
210
211 if (this.error) {
212 // There was a write error, there is no point in further trying to write to the socket.
213 return process.nextTick(function writePushError() {
214 callback(self.error);
215 });
216 }
217
218 this.queue.push({ operation: operation, callback: callback});
219 this.run();
220 }
221
222 run() {
223 if (!this.isRunning && this.canWrite) {

Callers 3

addMethod · 0.45
writeStringMapMethod · 0.45
processMethod · 0.45

Calls 1

runMethod · 0.95

Tested by

no test coverage detected