Class: Isono::NodeModules::DataStore
- Includes:
- Logger
- Defined in:
- lib/isono/node_modules/data_store.rb
Instance Attribute Summary collapse
-
#db ⇒ Object
readonly
Returns the value of attribute db.
-
#db_writer_thread ⇒ Object
readonly
Returns the value of attribute db_writer_thread.
Attributes inherited from Base
Class Method Summary collapse
Methods included from Logger
Methods inherited from Base
#config_section, #initialize, #manifest, #value_object
Constructor Details
This class inherits a constructor from Isono::NodeModules::Base
Instance Attribute Details
#db ⇒ Object (readonly)
Returns the value of attribute db.
36 37 38 |
# File 'lib/isono/node_modules/data_store.rb', line 36 def db @db end |
#db_writer_thread ⇒ Object (readonly)
Returns the value of attribute db_writer_thread.
36 37 38 |
# File 'lib/isono/node_modules/data_store.rb', line 36 def db_writer_thread @db_writer_thread end |
Class Method Details
.barrier(&blk) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/isono/node_modules/data_store.rb', line 28 def self.(&blk) @instance.db_writer_thread. { @instance.db.transaction { blk.call } } end |
.create_instance(node) ⇒ Object
16 17 18 |
# File 'lib/isono/node_modules/data_store.rb', line 16 def self.create_instance(node) @instance = self.new(node) end |
.pass(&blk) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/isono/node_modules/data_store.rb', line 20 def self.pass(&blk) @instance.db_writer_thread.pass { @instance.db.transaction { blk.call } } end |