Class: DpStmMap::ObjectStore
- Inherits:
-
Object
- Object
- DpStmMap::ObjectStore
- Defined in:
- lib/dp_stm_map/ObjectStore.rb
Instance Method Summary collapse
- #atomic(timeout = nil) ⇒ Object
- #atomic_read ⇒ Object
-
#initialize(stm_map) ⇒ ObjectStore
constructor
A new instance of ObjectStore.
- #on_atomic ⇒ Object
- #validate_atomic ⇒ Object
Constructor Details
#initialize(stm_map) ⇒ ObjectStore
Returns a new instance of ObjectStore.
48 49 50 |
# File 'lib/dp_stm_map/ObjectStore.rb', line 48 def initialize stm_map @stm_map=stm_map end |
Instance Method Details
#atomic(timeout = nil) ⇒ Object
59 60 61 62 63 |
# File 'lib/dp_stm_map/ObjectStore.rb', line 59 def atomic timeout=nil @stm_map.atomic(timeout) do |stx| yield ObjectTransactionWrapper.new(stx) end end |
#atomic_read ⇒ Object
65 66 67 68 69 |
# File 'lib/dp_stm_map/ObjectStore.rb', line 65 def atomic_read @stm_map.atomic_read do |stx| yield ObjectTransactionWrapper.new(stx) end end |
#on_atomic ⇒ Object
53 54 55 56 57 |
# File 'lib/dp_stm_map/ObjectStore.rb', line 53 def on_atomic @stm_map.on_atomic do |changes| yield changes_to_object_changes changes end end |
#validate_atomic ⇒ Object
71 72 73 74 75 |
# File 'lib/dp_stm_map/ObjectStore.rb', line 71 def validate_atomic @stm_map.validate_atomic do |changes| yield changes_to_object_changes changes end end |