Class: Neo4j::Embedded::EmbeddedTransaction
- Inherits:
-
Object
- Object
- Neo4j::Embedded::EmbeddedTransaction
show all
- Includes:
- Transaction::Instance
- Defined in:
- lib/neo4j-embedded/embedded_transaction.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#close, #expired?, #failed?, #mark_expired, #mark_failed, #pop_nested!, #push_nested!, #register_instance
Constructor Details
Returns a new instance of EmbeddedTransaction.
7
8
9
10
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 7
def initialize(root_tx)
@root_tx = root_tx
register_instance
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
#_commit_tx ⇒ Object
30
31
32
33
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 30
def _commit_tx
@root_tx.success
@root_tx.close
end
|
#_delete_tx ⇒ Object
25
26
27
28
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 25
def _delete_tx
@root_tx.failure
@root_tx.close
end
|
#acquire_read_lock(entity) ⇒ Object
12
13
14
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 12
def acquire_read_lock(entity)
@root_tx.acquire_read_lock(entity)
end
|
#acquire_write_lock(entity) ⇒ Object
16
17
18
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 16
def acquire_write_lock(entity)
@root_tx.acquire_write_lock(entity)
end
|
#inspect ⇒ Object
21
22
23
|
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 21
def inspect
"EmbeddedTransaction [nested: #{@pushed_nested} failed?: #{failure?} active: #{Neo4j::Transaction.current == self}]"
end
|