Class: Rediska::Utilities::SyncedPStore
- Inherits:
-
PStore
- Object
- PStore
- Rediska::Utilities::SyncedPStore
- Defined in:
- lib/rediska/databases/pstore.rb
Instance Method Summary collapse
-
#initialize(file) ⇒ SyncedPStore
constructor
A new instance of SyncedPStore.
- #transaction(read_only = false, &block) ⇒ Object
Constructor Details
#initialize(file) ⇒ SyncedPStore
Returns a new instance of SyncedPStore.
9 10 11 |
# File 'lib/rediska/databases/pstore.rb', line 9 def initialize(file) super(file, false) end |
Instance Method Details
#transaction(read_only = false, &block) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/rediska/databases/pstore.rb', line 13 def transaction(read_only = false, &block) @flock ||= path + '.lock' File.open(@flock, File::RDWR | File::CREAT) do super end end |