Class: Async::Redis::Protocol::RESP2::Connection

Inherits:
Protocol::Redis::Connection
  • Object
show all
Defined in:
lib/async/redis/protocol/resp2.rb

Overview

A connection implementation for RESP2 protocol.

Instance Method Summary collapse

Instance Method Details

#concurrencyObject

Get the concurrency level for this connection.



18
19
20
# File 'lib/async/redis/protocol/resp2.rb', line 18

def concurrency
	1
end

#reusable?Boolean

Check if the connection can be reused.

Returns:

  • (Boolean)


30
31
32
# File 'lib/async/redis/protocol/resp2.rb', line 30

def reusable?
	!@stream.closed?
end

#viable?Boolean

Check if the connection is viable for use.

Returns:

  • (Boolean)


24
25
26
# File 'lib/async/redis/protocol/resp2.rb', line 24

def viable?
	@stream.readable?
end