Class: DpStmMap::ObjectStore

Inherits:
Object
  • Object
show all
Defined in:
lib/dp_stm_map/ObjectStore.rb

Instance Method Summary collapse

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_readObject



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_atomicObject



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_atomicObject



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