Module: RR::NoisyConnection
- Defined in:
- lib/rubyrep/noisy_connection.rb
Overview
Modifies ProxyConnections to send regular pings to an installed TaskSweeper
Instance Attribute Summary collapse
-
#sweeper ⇒ Object
The installed TaskSweeper.
Instance Method Summary collapse
-
#commit_db_transaction ⇒ Object
Wraps ProxyConnection#commit_db_transaction to update the TaskSweeper.
-
#delete_record(table, values) ⇒ Object
Wraps ProxyConnection#delete_record to update the TaskSweeper.
-
#insert_record(table, values) ⇒ Object
Wraps ProxyConnection#insert_record to update the TaskSweeper.
-
#select_cursor(options) ⇒ Object
Modifies ProxyConnection#select_cursor to wrap the returned cursor into a NoisyCursor.
-
#update_record(table, values, org_key = nil) ⇒ Object
Wraps ProxyConnection#update_record to update the TaskSweeper.
Instance Attribute Details
#sweeper ⇒ Object
The installed TaskSweeper
37 38 39 |
# File 'lib/rubyrep/noisy_connection.rb', line 37 def sweeper @sweeper end |
Instance Method Details
#commit_db_transaction ⇒ Object
Wraps ProxyConnection#commit_db_transaction to update the TaskSweeper
73 74 75 76 77 78 |
# File 'lib/rubyrep/noisy_connection.rb', line 73 def commit_db_transaction sweeper.ping result = super sweeper.ping result end |
#delete_record(table, values) ⇒ Object
Wraps ProxyConnection#delete_record to update the TaskSweeper
65 66 67 68 69 70 |
# File 'lib/rubyrep/noisy_connection.rb', line 65 def delete_record(table, values) sweeper.ping result = super sweeper.ping result end |
#insert_record(table, values) ⇒ Object
Wraps ProxyConnection#insert_record to update the TaskSweeper
49 50 51 52 53 54 |
# File 'lib/rubyrep/noisy_connection.rb', line 49 def insert_record(table, values) sweeper.ping result = super sweeper.ping result end |
#select_cursor(options) ⇒ Object
Modifies ProxyConnection#select_cursor to wrap the returned cursor into a NoisyCursor.
41 42 43 44 45 46 |
# File 'lib/rubyrep/noisy_connection.rb', line 41 def select_cursor() sweeper.ping org_cursor = super sweeper.ping NoisyCursor.new(org_cursor, sweeper) end |
#update_record(table, values, org_key = nil) ⇒ Object
Wraps ProxyConnection#update_record to update the TaskSweeper
57 58 59 60 61 62 |
# File 'lib/rubyrep/noisy_connection.rb', line 57 def update_record(table, values, org_key = nil) sweeper.ping result = super sweeper.ping result end |