Class: XRay::RulePoller
- Inherits:
-
Object
- Object
- XRay::RulePoller
- Includes:
- Logging
- Defined in:
- lib/aws-xray-sdk/sampling/rule_poller.rb
Overview
Polls sampling rules from X-Ray service
Instance Attribute Summary collapse
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
-
#connector ⇒ Object
readonly
Returns the value of attribute connector.
Instance Method Summary collapse
-
#initialize(cache:, connector:) ⇒ RulePoller
constructor
A new instance of RulePoller.
- #run ⇒ Object
Methods included from Logging
Constructor Details
#initialize(cache:, connector:) ⇒ RulePoller
Returns a new instance of RulePoller.
9 10 11 12 |
# File 'lib/aws-xray-sdk/sampling/rule_poller.rb', line 9 def initialize(cache:, connector:) @cache = cache @connector = connector end |
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
7 8 9 |
# File 'lib/aws-xray-sdk/sampling/rule_poller.rb', line 7 def cache @cache end |
#connector ⇒ Object (readonly)
Returns the value of attribute connector.
7 8 9 |
# File 'lib/aws-xray-sdk/sampling/rule_poller.rb', line 7 def connector @connector end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 |
# File 'lib/aws-xray-sdk/sampling/rule_poller.rb', line 14 def run @worker ||= begin Thread.new { poll } end @worker.run end |