Class: Longleaf::ApplicationConfigManager

Inherits:
Object
  • Object
show all
Defined in:
lib/longleaf/services/application_config_manager.rb

Overview

Manager which loads and provides access to the configuration of the application

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, config_md5 = nil) ⇒ ApplicationConfigManager

Returns a new instance of ApplicationConfigManager.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/longleaf/services/application_config_manager.rb', line 21

def initialize(config, config_md5 = nil)
  @config_md5 = config_md5

  @location_manager = Longleaf::StorageLocationManager.new(config)

  definition_manager = Longleaf::ServiceDefinitionManager.new(config)
  mapping_manager = Longleaf::ServiceMappingManager.new(config)
  @service_manager = Longleaf::ServiceManager.new(
      definition_manager: definition_manager,
      mapping_manager: mapping_manager,
      app_manager: self)

  sys_config = config[AppFields::SYSTEM]
  @index_manager = IndexManager.new(sys_config, self)
  @md_manager = MetadataPersistenceManager.new(@index_manager)
end

Instance Attribute Details

#config_md5Object (readonly)

Returns the value of attribute config_md5.



15
16
17
# File 'lib/longleaf/services/application_config_manager.rb', line 15

def config_md5
  @config_md5
end

#index_managerObject (readonly)

Returns the value of attribute index_manager.



18
19
20
# File 'lib/longleaf/services/application_config_manager.rb', line 18

def index_manager
  @index_manager
end

#location_managerObject (readonly)

Returns the value of attribute location_manager.



17
18
19
# File 'lib/longleaf/services/application_config_manager.rb', line 17

def location_manager
  @location_manager
end

#md_managerObject (readonly)

Returns the value of attribute md_manager.



19
20
21
# File 'lib/longleaf/services/application_config_manager.rb', line 19

def md_manager
  @md_manager
end

#service_managerObject (readonly)

Returns the value of attribute service_manager.



16
17
18
# File 'lib/longleaf/services/application_config_manager.rb', line 16

def service_manager
  @service_manager
end