Class: Pacer::Neo4j2::TransactionEventHandler
- Inherits:
-
Object
- Object
- Pacer::Neo4j2::TransactionEventHandler
- Defined in:
- lib/pacer-neo4j2/transaction_event_handler.rb
Instance Attribute Summary collapse
-
#before_commit ⇒ Object
Returns the value of attribute before_commit.
-
#before_commit_wrapper ⇒ Object
Returns the value of attribute before_commit_wrapper.
-
#enable_cache ⇒ Object
readonly
Returns the value of attribute enable_cache.
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
-
#on_commit ⇒ Object
Returns the value of attribute on_commit.
-
#on_commit_failed ⇒ Object
Returns the value of attribute on_commit_failed.
-
#on_commit_failed_wrapper ⇒ Object
Returns the value of attribute on_commit_failed_wrapper.
-
#on_commit_wrapper ⇒ Object
Returns the value of attribute on_commit_wrapper.
-
#type_property ⇒ Object
Returns the value of attribute type_property.
Instance Method Summary collapse
- #enable_cache! ⇒ Object
-
#initialize(graph) ⇒ TransactionEventHandler
constructor
A new instance of TransactionEventHandler.
- #unregister! ⇒ Object
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_commit ⇒ Object
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_wrapper ⇒ Object
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_cache ⇒ Object (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 |
#graph ⇒ Object (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_commit ⇒ Object
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_failed ⇒ Object
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_wrapper ⇒ Object
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_wrapper ⇒ Object
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_property ⇒ Object
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 |