Class: RIMS::Protocol::ConnectionLimits
- Inherits:
-
Object
- Object
- RIMS::Protocol::ConnectionLimits
- Defined in:
- lib/rims/protocol/connection.rb
Instance Attribute Summary collapse
-
#read_polling_interval_seconds ⇒ Object
readonly
Returns the value of attribute read_polling_interval_seconds.
Instance Method Summary collapse
- #command_wait_timeout_seconds ⇒ Object
- #command_wait_timeout_seconds=(value) ⇒ Object
-
#initialize(read_polling_interval_seconds, command_wait_timeout_seconds) ⇒ ConnectionLimits
constructor
A new instance of ConnectionLimits.
- #to_h ⇒ Object
Constructor Details
#initialize(read_polling_interval_seconds, command_wait_timeout_seconds) ⇒ ConnectionLimits
Returns a new instance of ConnectionLimits.
8 9 10 11 12 |
# File 'lib/rims/protocol/connection.rb', line 8 def initialize(read_polling_interval_seconds, command_wait_timeout_seconds) @mutex = Thread::Mutex.new @read_polling_interval_seconds = read_polling_interval_seconds self.command_wait_timeout_seconds = command_wait_timeout_seconds end |
Instance Attribute Details
#read_polling_interval_seconds ⇒ Object (readonly)
Returns the value of attribute read_polling_interval_seconds.
14 15 16 |
# File 'lib/rims/protocol/connection.rb', line 14 def read_polling_interval_seconds @read_polling_interval_seconds end |
Instance Method Details
#command_wait_timeout_seconds ⇒ Object
16 17 18 |
# File 'lib/rims/protocol/connection.rb', line 16 def command_wait_timeout_seconds @mutex.synchronize{ @command_wait_timeout_seconds } end |
#command_wait_timeout_seconds=(value) ⇒ Object
20 21 22 |
# File 'lib/rims/protocol/connection.rb', line 20 def command_wait_timeout_seconds=(value) @mutex.synchronize{ @command_wait_timeout_seconds = value } end |
#to_h ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/rims/protocol/connection.rb', line 24 def to_h Hash[ [ :read_polling_interval_seconds, :command_wait_timeout_seconds ].map{|n| [ n, __send__(n) ] } ] end |