Class: ReliableMsg::MessageStore::Memory

Inherits:
Base show all
Defined in:
lib/ap4r/message_store_ext.rb

Overview

:nodoc:

Constant Summary collapse

TYPE =
self.name.split('::').last.downcase
DEFAULT_CONFIG =
{
  "type"=>TYPE,
}

Instance Attribute Summary

Attributes inherited from Base

#cache, #mutex, #queues, #topics

Instance Method Summary collapse

Methods inherited from Base

#activate_original, configure, #stale_queue

Constructor Details

#initialize(config, logger) ⇒ Memory

Returns a new instance of Memory.



406
407
408
409
410
# File 'lib/ap4r/message_store_ext.rb', line 406

def initialize config, logger
  super logger
  # memory_map maps messages (by ID) to memory. The value is messege object.
  @memory_map = {}
end

Instance Method Details

#activateObject



428
429
430
# File 'lib/ap4r/message_store_ext.rb', line 428

def activate
  super
end

#configurationObject



423
424
425
# File 'lib/ap4r/message_store_ext.rb', line 423

def configuration
  { "type"=>TYPE }
end

#deactivateObject



433
434
435
436
# File 'lib/ap4r/message_store_ext.rb', line 433

def deactivate
  @memory_map = nil
  super
end

#setupObject



418
419
420
# File 'lib/ap4r/message_store_ext.rb', line 418

def setup
  # do nothing
end

#typeObject



413
414
415
# File 'lib/ap4r/message_store_ext.rb', line 413

def type
  TYPE
end