Class: RedisConnection

vertx-redis-js/redis_connection~ RedisConnection

new RedisConnection()

A simple Redis client.
Source:

Methods

batch(commands, onSend) → {RedisConnection}

Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.
Parameters:
Name Type Description
commands Array.<Request> list of command to send
onSend function the asynchronous result handler.
Source:
Returns:
fluent self.
Type
RedisConnection

close()

Closes the connection or returns to the pool.
Source:

endHandler(endHandler) → {RedisConnection}

Parameters:
Name Type Description
endHandler function
Source:
Returns:
Type
RedisConnection

exceptionHandler(handler) → {RedisConnection}

Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisConnection

fetch(amount) → {RedisConnection}

Parameters:
Name Type Description
amount number
Source:
Returns:
Type
RedisConnection

handler(handler) → {RedisConnection}

Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisConnection

pause() → {RedisConnection}

Source:
Returns:
Type
RedisConnection

pendingQueueFull() → {boolean}

Flag to notify if the pending message queue (commands in transit) is full. When the pending message queue is full and a new send command is issued it will result in a exception to be thrown. Checking this flag before sending can allow the application to wait before sending the next message.
Source:
Returns:
true is queue is full.
Type
boolean

pipe() → {Pipe}

Pause this stream and return a to transfer the elements of this stream to a destination .

The stream will be resumed when the pipe will be wired to a WriteStream.

Source:
Returns:
a pipe
Type
Pipe

pipeTo(dst, handler)

Pipe this ReadStream to the WriteStream.

Elements emitted by this stream will be written to the write stream until this stream ends or fails.

Once this stream has ended or failed, the write stream will be ended and the handler will be called with the result.

Parameters:
Name Type Description
dst WriteStream the destination write stream
handler function
Source:

resume() → {RedisConnection}

Source:
Returns:
Type
RedisConnection

send(command, onSend) → {RedisConnection}

Send the given command to the redis server or cluster.
Parameters:
Name Type Description
command Request the command to send
onSend function the asynchronous result handler.
Source:
Returns:
fluent self.
Type
RedisConnection