Module: Neo4j::Transaction::Instance
- Included in:
- Embedded::EmbeddedTransaction, Server::CypherTransaction
- Defined in:
- lib/neo4j/transaction.rb
Instance Method Summary collapse
-
#acquire_read_lock(entity) ⇒ Java::OrgNeo4jKernelImplCoreapi::PropertyContainerLocker
Only for the embedded neo4j ! Acquires a read lock for entity for this transaction.
-
#acquire_write_lock(entity) ⇒ Java::OrgNeo4jKernelImplCoreapi::PropertyContainerLocker
Only for the embedded neo4j ! Acquires a write lock for entity for this transaction.
- #autoclosed! ⇒ Object
- #autoclosed? ⇒ Boolean
-
#close ⇒ Object
Commits or marks this transaction for rollback, depending on whether failure() has been previously invoked.
- #expired? ⇒ Boolean
-
#failed? ⇒ Boolean
(also: #failure?)
If it has been marked as failed.
- #mark_expired ⇒ Object
-
#mark_failed ⇒ Object
(also: #failure)
Marks this transaction as failed, which means that it will unconditionally be rolled back when close() is called.
- #pop_nested! ⇒ Object
- #push_nested! ⇒ Object
- #register_instance ⇒ Object
- #transient_failures_autoclose? ⇒ Boolean
Instance Method Details
#acquire_read_lock(entity) ⇒ Java::OrgNeo4jKernelImplCoreapi::PropertyContainerLocker
Only for the embedded neo4j ! Acquires a read lock for entity for this transaction. See neo4j java docs.
59 60 |
# File 'lib/neo4j/transaction.rb', line 59 def acquire_read_lock(entity) end |
#acquire_write_lock(entity) ⇒ Java::OrgNeo4jKernelImplCoreapi::PropertyContainerLocker
Only for the embedded neo4j ! Acquires a write lock for entity for this transaction. See neo4j java docs.
67 68 |
# File 'lib/neo4j/transaction.rb', line 67 def acquire_write_lock(entity) end |
#autoclosed! ⇒ Object
24 25 26 |
# File 'lib/neo4j/transaction.rb', line 24 def autoclosed! @autoclosed = true if transient_failures_autoclose? end |
#autoclosed? ⇒ Boolean
32 33 34 |
# File 'lib/neo4j/transaction.rb', line 32 def autoclosed? !!@autoclosed end |
#close ⇒ Object
Commits or marks this transaction for rollback, depending on whether failure() has been previously invoked.
71 72 73 74 75 76 77 |
# File 'lib/neo4j/transaction.rb', line 71 def close pop_nested! return if @pushed_nested >= 0 fail "Can't commit transaction, already committed" if @pushed_nested < -1 Neo4j::Transaction.unregister(self) post_close! end |
#expired? ⇒ Boolean
40 41 42 |
# File 'lib/neo4j/transaction.rb', line 40 def expired? !!@expired end |
#failed? ⇒ Boolean Also known as: failure?
If it has been marked as failed. Aliased for legacy purposes.
19 20 21 |
# File 'lib/neo4j/transaction.rb', line 19 def failed? !!@failure end |
#mark_expired ⇒ Object
36 37 38 |
# File 'lib/neo4j/transaction.rb', line 36 def mark_expired @expired = true end |
#mark_failed ⇒ Object Also known as: failure
Marks this transaction as failed, which means that it will unconditionally be rolled back when close() is called. Aliased for legacy purposes.
13 14 15 |
# File 'lib/neo4j/transaction.rb', line 13 def mark_failed @failure = true end |
#pop_nested! ⇒ Object
50 51 52 |
# File 'lib/neo4j/transaction.rb', line 50 def pop_nested! @pushed_nested -= 1 end |
#push_nested! ⇒ Object
45 46 47 |
# File 'lib/neo4j/transaction.rb', line 45 def push_nested! @pushed_nested += 1 end |
#register_instance ⇒ Object
7 8 9 10 |
# File 'lib/neo4j/transaction.rb', line 7 def register_instance @pushed_nested = 0 Neo4j::Transaction.register(self) end |