module RR::NoisyConnection
Modifies ProxyConnections to send regular pings to an installed TaskSweeper
Attributes
sweeper[RW]
The installed TaskSweeper
Public Instance Methods
commit_db_transaction()
click to toggle source
Wraps ProxyConnection#commit_db_transaction to update the TaskSweeper
Calls superclass method
# File lib/rubyrep/noisy_connection.rb, line 73 def commit_db_transaction sweeper.ping result = super sweeper.ping result end
delete_record(table, values)
click to toggle source
Wraps ProxyConnection#delete_record
to update the TaskSweeper
Calls superclass method
# 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)
click to toggle source
Wraps ProxyConnection#insert_record
to update the TaskSweeper
Calls superclass method
# File lib/rubyrep/noisy_connection.rb, line 49 def insert_record(table, values) sweeper.ping result = super sweeper.ping result end
select_cursor(options)
click to toggle source
Modifies ProxyConnection#select_cursor
to wrap the returned cursor into a NoisyCursor
.
Calls superclass method
# File lib/rubyrep/noisy_connection.rb, line 41 def select_cursor(options) sweeper.ping org_cursor = super sweeper.ping NoisyCursor.new(org_cursor, sweeper) end
update_record(table, values, org_key = nil)
click to toggle source
Wraps ProxyConnection#update_record
to update the TaskSweeper
Calls superclass method
# File lib/rubyrep/noisy_connection.rb, line 57 def update_record(table, values, org_key = nil) sweeper.ping result = super sweeper.ping result end