Class: Stockpile::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/stockpile/configuration.rb

Overview

Stockpile::Configuration

Holds configuration for cache with writeable attributes allowing dynamic change of configuration during runtime

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



26
27
28
29
30
31
32
33
34
# File 'lib/stockpile/configuration.rb', line 26

def initialize
  @configuration_file = extract_configuration_file
  @connection_pool = extract_connection_pool
  @connection_timeout = extract_connection_timeout
  @lock_expiration = extract_lock_expiration
  @redis_url = extract_redis_url
  @sentinels = extract_sentinels
  @slumber = extract_slumber
end

Instance Attribute Details

#configuration_fileObject

Returns the value of attribute configuration_file.



23
24
25
# File 'lib/stockpile/configuration.rb', line 23

def configuration_file
  @configuration_file
end

#connection_poolObject

Returns the value of attribute connection_pool.



23
24
25
# File 'lib/stockpile/configuration.rb', line 23

def connection_pool
  @connection_pool
end

#connection_timeoutObject

Returns the value of attribute connection_timeout.



23
24
25
# File 'lib/stockpile/configuration.rb', line 23

def connection_timeout
  @connection_timeout
end

#lock_expirationObject

Returns the value of attribute lock_expiration.



23
24
25
# File 'lib/stockpile/configuration.rb', line 23

def lock_expiration
  @lock_expiration
end

#redis_urlObject

Returns the value of attribute redis_url.



23
24
25
# File 'lib/stockpile/configuration.rb', line 23

def redis_url
  @redis_url
end

#sentinelsObject

Returns the value of attribute sentinels.



23
24
25
# File 'lib/stockpile/configuration.rb', line 23

def sentinels
  @sentinels
end

#slumberObject

Returns the value of attribute slumber.



23
24
25
# File 'lib/stockpile/configuration.rb', line 23

def slumber
  @slumber
end