Class: Async::Redis::Protocol::RESP2::Connection
- Inherits:
-
Protocol::Redis::Connection
- Object
- Protocol::Redis::Connection
- Async::Redis::Protocol::RESP2::Connection
- Defined in:
- lib/async/redis/protocol/resp2.rb
Overview
A connection implementation for RESP2 protocol.
Instance Method Summary collapse
-
#concurrency ⇒ Object
Get the concurrency level for this connection.
-
#reusable? ⇒ Boolean
Check if the connection can be reused.
-
#viable? ⇒ Boolean
Check if the connection is viable for use.
Instance Method Details
#concurrency ⇒ Object
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.
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.
24 25 26 |
# File 'lib/async/redis/protocol/resp2.rb', line 24 def viable? @stream.readable? end |