Class: LaunchDarkly::PollingProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/ldclient-rb/polling.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


14
15
16
# File 'lib/ldclient-rb/polling.rb', line 14

def initialized?
  @initialized.value
end

#startObject



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