Class: LaunchDarkly::PollingProcessor
- Inherits:
-
Object
- Object
- LaunchDarkly::PollingProcessor
- Defined in:
- lib/ldclient-rb/polling.rb
Instance Method Summary collapse
-
#initialize(config, requestor) ⇒ PollingProcessor
constructor
A new instance of PollingProcessor.
- #initialized? ⇒ Boolean
- #start ⇒ Object
Constructor Details
#initialize(config, requestor) ⇒ PollingProcessor
Returns a new instance of PollingProcessor.
7 8 9 10 11 12 |
# File 'lib/ldclient-rb/polling.rb', line 7 def initialize(config, requestor) @config = config @requestor = requestor @initialized = Concurrent::AtomicBoolean.new(false) @started = Concurrent::AtomicBoolean.new(false) end |
Instance Method Details
#initialized? ⇒ Boolean
14 15 16 |
# File 'lib/ldclient-rb/polling.rb', line 14 def initialized? @initialized.value end |
#start ⇒ Object
18 19 20 21 22 |
# File 'lib/ldclient-rb/polling.rb', line 18 def start return unless @started.make_true @config.logger.info("[LDClient] Initializing polling connection") create_worker end |