Sha256: 779e99a0c639f29e9e3a0141c6f7c67983ad828223bd812b79a9748690438e28

Contents?: true

Size: 732 Bytes

Versions: 49

Compression:

Stored size: 732 Bytes

Contents

module Neo4j
  module 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
        @root_tx.failure
        @root_tx.close
      end

      def commit
        @root_tx.success
        @root_tx.close
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
neo4j-core-6.0.0.alpha.5 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-6.0.0.alpha.2 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.7 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-6.0.0.alpha.1 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.6 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.5 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.4 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.3 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.2 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.1 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.0 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.0.rc.3 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.0.rc.2 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.1.0.rc.1 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.0.10 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.0.9 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.0.8 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.0.7 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.0.6 lib/neo4j-embedded/embedded_transaction.rb
neo4j-core-5.0.5 lib/neo4j-embedded/embedded_transaction.rb