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
Constructor.
Methods inherited from Wrapper
#clear, #close, #delete, #increment, #key?, #load, #store
Methods inherited from Proxy
#clear, #close, #delete, #increment, #key?, #load, #store
Methods inherited from Base
#[], #[]=, #close, #decrement, #fetch, #increment, #key?
Methods included from Mixins::WithOptions
#expires, #prefix, #raw, #with
Constructor Details
#initialize(adapter, options = {}) ⇒ Lock
Constructor
12 13 14 15 |
# File 'lib/moneta/lock.rb', line 12 def initialize(adapter, = {}) super @lock = [:mutex] || Mutex.new end |