Module: Neo4j::Transaction::Instance
- Included in:
- Embedded::EmbeddedTransaction, Server::CypherTransaction
- Defined in:
- lib/neo4j/transaction.rb
Instance Method Summary (collapse)
-
- (Java::OrgNeo4jKernelImplCoreapi::PropertyContainerLocker) acquire_read_lock(entity)
Only for the embedded neo4j ! Acquires a read lock for entity for this transaction.
-
- (Java::OrgNeo4jKernelImplCoreapi::PropertyContainerLocker) acquire_write_lock(entity)
Only for the embedded neo4j ! Acquires a write lock for entity for this transaction.
-
- (Object) close
Commits or marks this transaction for rollback, depending on whether failure() has been previously invoked.
- - (Boolean) expired?
-
- (Boolean) failed?
(also: #failure?)
If it has been marked as failed.
- - (Object) mark_expired (also: #expired)
-
- (Object) mark_failed
(also: #failure)
Marks this transaction as failed, which means that it will unconditionally be rolled back when close() is called.
Instance Method Details
- (Java::OrgNeo4jKernelImplCoreapi::PropertyContainerLocker) acquire_read_lock(entity)
Only for the embedded neo4j ! Acquires a read lock for entity for this transaction. See neo4j java docs.
48 49 |
# File 'lib/neo4j/transaction.rb', line 48 def acquire_read_lock(entity) end |
- (Java::OrgNeo4jKernelImplCoreapi::PropertyContainerLocker) acquire_write_lock(entity)
Only for the embedded neo4j ! Acquires a write lock for entity for this transaction. See neo4j java docs.
56 57 |
# File 'lib/neo4j/transaction.rb', line 56 def acquire_write_lock(entity) end |
- (Object) close
Commits or marks this transaction for rollback, depending on whether failure() has been previously invoked.
60 61 62 63 64 65 66 |
# File 'lib/neo4j/transaction.rb', line 60 def close pop_nested! return if @pushed_nested >= 0 fail "Can't commit transaction, already committed" if @pushed_nested < -1 Neo4j::Transaction.unregister(self) failed? ? _delete_tx : _commit_tx end |
- (Boolean) expired?
29 30 31 |
# File 'lib/neo4j/transaction.rb', line 29 def expired? !!@expired end |
- (Boolean) failed? 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 |
- (Object) mark_expired Also known as: expired
24 25 26 |
# File 'lib/neo4j/transaction.rb', line 24 def mark_expired @expired = true end |
- (Object) mark_failed 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 |