Class: Moneta::Lock
Overview
Locks the underlying stores with a Mutex
Instance Attribute Summary
Attributes inherited from Proxy
Instance Method Summary collapse
-
#initialize(adapter, options = {}) ⇒ Lock
constructor
A new instance of Lock.
Methods inherited from Wrapper
#clear, #close, #config, #create, #delete, #each_key, #features, #fetch_values, #increment, #key?, #load, #merge!, #slice, #store, #values_at
Methods inherited from Proxy
#clear, #close, #config, #create, #delete, #each_key, #features, features_mask, #fetch_values, #increment, #key?, #load, #merge!, not_supports, #slice, #store, #values_at
Methods included from Config
Methods included from Defaults
#[], #[]=, #close, #create, #decrement, #each_key, #features, #fetch, #fetch_values, included, #increment, #key?, #merge!, #slice, #supports?, #update, #values_at
Methods included from OptionSupport
#expires, #prefix, #raw, #with
Constructor Details
#initialize(adapter, options = {}) ⇒ Lock
Returns a new instance of Lock.
10 11 12 13 |
# File 'lib/moneta/lock.rb', line 10 def initialize(adapter, = {}) super @lock = [:mutex] || ::Mutex.new end |