Class: OMQ::QoS::PeerRegistry::PeerState

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#connectionObject

Returns the value of attribute connection.



33
34
35
# File 'lib/omq/qos/peer_registry.rb', line 33

def connection
  @connection
end

#disconnected_atObject

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

#entriesObject (readonly)

Returns the value of attribute entries.



34
35
36
# File 'lib/omq/qos/peer_registry.rb', line 34

def entries
  @entries
end