Class: AgentFIX::MessageCache

Inherits:
Object
  • Object
show all
Defined in:
lib/agent_fix/message_cache.rb

Instance Method Summary collapse

Instance Method Details

#add_message(msg) ⇒ Object



10
11
12
13
14
# File 'lib/agent_fix/message_cache.rb', line 10

def add_message msg
  lock.synchronize do
    msgs << msg
  end
end

#clear!Object



16
17
18
19
20
# File 'lib/agent_fix/message_cache.rb', line 16

def clear!
  lock.synchronize do
    msgs.clear
  end
end

#messagesObject



4
5
6
7
8
# File 'lib/agent_fix/message_cache.rb', line 4

def messages
  lock.synchronize do
    return msgs.dup
  end
end