Class: Neo4j::Embedded::EmbeddedTransaction
Instance Attribute Summary collapse
#root, #session
Instance Method Summary
collapse
#autoclosed!, #close, #closed?, #expired?, #failed?, #inspect, #mark_expired, #mark_failed, #root?
Constructor Details
Returns a new instance of EmbeddedTransaction.
6
7
8
9
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 6
def initialize(session)
super
@root_tx = @session.begin_tx
end
|
Instance Attribute Details
#root_tx ⇒ Object
Returns the value of attribute root_tx.
4
5
6
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 4
def root_tx
@root_tx
end
|
Instance Method Details
#acquire_read_lock(entity) ⇒ Object
11
12
13
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 11
def acquire_read_lock(entity)
@root_tx.acquire_read_lock(entity)
end
|
#acquire_write_lock(entity) ⇒ Object
15
16
17
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 15
def acquire_write_lock(entity)
@root_tx.acquire_write_lock(entity)
end
|
#commit ⇒ Object
24
25
26
27
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 24
def commit
@root_tx.success
@root_tx.close
end
|
#delete ⇒ Object
19
20
21
22
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 19
def delete
@root_tx.failure
@root_tx.close
end
|