Class: Moped::PromiscuousQueryWrapper::PromiscuousReadOperation
- Inherits:
-
Promiscuous::Publisher::Operation::NonPersistent
- Object
- Promiscuous::Publisher::Operation::Base
- Promiscuous::Publisher::Operation::NonPersistent
- Moped::PromiscuousQueryWrapper::PromiscuousReadOperation
- Includes:
- PromiscuousHelpers
- Defined in:
- lib/promiscuous/publisher/operation/mongoid.rb
Instance Attribute Summary
Attributes inherited from Promiscuous::Publisher::Operation::NonPersistent
Attributes inherited from Promiscuous::Publisher::Operation::Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PromiscuousReadOperation
constructor
A new instance of PromiscuousReadOperation.
- #query_dependencies ⇒ Object
- #should_instrument_query? ⇒ Boolean
Methods inherited from Promiscuous::Publisher::Operation::NonPersistent
#execute_instrumented, #operation_payloads
Methods inherited from Promiscuous::Publisher::Operation::Base
_acquire_lock, #acquire_op_lock, #dependencies_for, #dependency_for_op_lock, #ensure_op_still_locked, #execute, #execute_instrumented, #explain_operation, #generate_payload, #get_new_op_lock, #increment_dependencies, lock_options, #on_rabbitmq_confirm, #operation_payloads, #payload_for, #publish_payload_in_rabbitmq_async, #publish_payload_in_redis, rabbitmq_staging_set_key, #record_timestamp, #recover_db_operation, recover_locks, recover_operation, recover_operation_from_lock, recover_payloads_for_rabbitmq, #recovering?, #recovery_payload, register_recovery_mechanism, #release_op_lock, run_recovery_mechanisms, #trace_operation, #write_dependencies
Constructor Details
#initialize(options = {}) ⇒ PromiscuousReadOperation
Returns a new instance of PromiscuousReadOperation.
203 204 205 206 207 |
# File 'lib/promiscuous/publisher/operation/mongoid.rb', line 203 def initialize(={}) super @operation = :read @query = [:query] end |
Instance Method Details
#query_dependencies ⇒ Object
209 210 211 212 |
# File 'lib/promiscuous/publisher/operation/mongoid.rb', line 209 def query_dependencies deps = dependencies_for(get_selector_instance) deps.empty? ? super : deps end |
#should_instrument_query? ⇒ Boolean
214 215 216 |
# File 'lib/promiscuous/publisher/operation/mongoid.rb', line 214 def should_instrument_query? super && model end |