Class: OMQ::QoS::PeerRegistry::PeerState
- Inherits:
-
Object
- Object
- OMQ::QoS::PeerRegistry::PeerState
- Defined in:
- lib/omq/qos/peer_registry.rb
Overview
Per-peer state: the currently-connected Protocol::ZMTP::Connection
(or nil when the peer is gone), the disconnect timestamp used by
the dead-letter sweep, and the digest-keyed pending map. Insertion
order is preserved so #resume can replay in original send order.
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#disconnected_at ⇒ Object
Returns the value of attribute disconnected_at.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
Instance Method Summary collapse
-
#initialize(connection) ⇒ PeerState
constructor
A new instance of PeerState.
Constructor Details
#initialize(connection) ⇒ PeerState
Returns a new instance of PeerState.
37 38 39 40 41 |
# File 'lib/omq/qos/peer_registry.rb', line 37 def initialize(connection) @connection = connection @disconnected_at = nil @entries = {} end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
33 34 35 |
# File 'lib/omq/qos/peer_registry.rb', line 33 def connection @connection end |
#disconnected_at ⇒ Object
Returns the value of attribute disconnected_at.
33 34 35 |
# File 'lib/omq/qos/peer_registry.rb', line 33 def disconnected_at @disconnected_at end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
34 35 36 |
# File 'lib/omq/qos/peer_registry.rb', line 34 def entries @entries end |