Class: AgentFIX::MessageCache
- Inherits:
-
Object
- Object
- AgentFIX::MessageCache
- 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 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 |
#messages ⇒ Object
4 5 6 7 8 |
# File 'lib/agent_fix/message_cache.rb', line 4 def lock.synchronize do return msgs.dup end end |