Sha256: ebeb37fb2681ad85710038cb5c965353cb298d4d134dbd93344f6b9daa62513b

Contents?: true

Size: 676 Bytes

Versions: 15

Compression:

Stored size: 676 Bytes

Contents

module Neo4j::Embedded
  class EmbeddedTransaction
    attr_reader :root_tx
    include Neo4j::Transaction::Instance

    def initialize(root_tx)
      @root_tx = root_tx
      register_instance
    end

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

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


    def inspect
      "EmbeddedTransaction [nested: #{@pushed_nested} failed?: #{failure?} active: #{Neo4j::Transaction.current == self}]"
    end

    def _delete_tx
      @root_tx.failure
      @root_tx.close
    end

    def _commit_tx
      @root_tx.success
      @root_tx.close
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
neo4j-core-3.1.1 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.1.0 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.8 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.7 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.6 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.5 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.4 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.3 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.2 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.1 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.0 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.0.rc.5 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.0.rc.4 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.0.rc.1 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-3.0.0.alpha.19 lib/neo4j-embedded/embedded_transaction.rb