Class: Pacer::Neo4j2::TransactionEventHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/pacer-neo4j2/transaction_event_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(graph) ⇒ TransactionEventHandler

Returns a new instance of TransactionEventHandler.



11
12
13
14
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 11

def initialize(graph)
  @graph = graph
  @on_commit_wrapper = @on_commit_failed_wrapper = @before_commit_wrapper = TxDataWrapper
end

Instance Attribute Details

#before_commitObject

Returns the value of attribute before_commit.



7
8
9
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 7

def before_commit
  @before_commit
end

#before_commit_wrapperObject

Returns the value of attribute before_commit_wrapper.



8
9
10
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 8

def before_commit_wrapper
  @before_commit_wrapper
end

#enable_cacheObject (readonly)

Returns the value of attribute enable_cache.



6
7
8
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 6

def enable_cache
  @enable_cache
end

#graphObject (readonly)

Returns the value of attribute graph.



6
7
8
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 6

def graph
  @graph
end

#on_commitObject

Returns the value of attribute on_commit.



7
8
9
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 7

def on_commit
  @on_commit
end

#on_commit_failedObject

Returns the value of attribute on_commit_failed.



7
8
9
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 7

def on_commit_failed
  @on_commit_failed
end

#on_commit_failed_wrapperObject

Returns the value of attribute on_commit_failed_wrapper.



8
9
10
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 8

def on_commit_failed_wrapper
  @on_commit_failed_wrapper
end

#on_commit_wrapperObject

Returns the value of attribute on_commit_wrapper.



8
9
10
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 8

def on_commit_wrapper
  @on_commit_wrapper
end

#type_propertyObject

Returns the value of attribute type_property.



9
10
11
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 9

def type_property
  @type_property
end

Instance Method Details

#enable_cache!Object



20
21
22
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 20

def enable_cache!
  @enable_cache = true
end

#unregister!Object



16
17
18
# File 'lib/pacer-neo4j2/transaction_event_handler.rb', line 16

def unregister!
  graph.drop_handler self
end