Class: Neo4j::Embedded::EmbeddedTransaction

Inherits:
Object
  • Object
show all
Includes:
Transaction::Instance
Defined in:
lib/neo4j-embedded/embedded_transaction.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from Transaction::Instance

#close, #expired?, #failed?, #mark_expired, #mark_failed

Constructor Details

- (EmbeddedTransaction) initialize(root_tx)

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

- (Object) root_tx (readonly)

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

- (Object) _commit_tx



30
31
32
33
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 30

def _commit_tx
  @root_tx.success
  @root_tx.close
end

- (Object) _delete_tx



25
26
27
28
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 25

def _delete_tx
  @root_tx.failure
  @root_tx.close
end

- (Object) acquire_read_lock(entity)



12
13
14
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 12

def acquire_read_lock(entity)
  @root_tx.acquire_read_lock(entity)
end

- (Object) acquire_write_lock(entity)



16
17
18
# File 'lib/neo4j-embedded/embedded_transaction.rb', line 16

def acquire_write_lock(entity)
  @root_tx.acquire_write_lock(entity)
end

- (Object) inspect



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