Class: LaunchDarkly::Impl::DataSource::NullUpdateProcessor
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::DataSource::NullUpdateProcessor
- Includes:
- LaunchDarkly::Interfaces::DataSource
- Defined in:
- lib/ldclient-rb/impl/data_source/null_processor.rb
Overview
A minimal UpdateProcessor implementation used when the SDK is in offline mode or daemon (LDD) mode. It does nothing except mark itself as initialized.
Instance Method Summary collapse
-
#initialize ⇒ NullUpdateProcessor
constructor
Creates a new NullUpdateProcessor.
-
#initialized? ⇒ Boolean
Checks if the data source has been initialized.
-
#start ⇒ Concurrent::Event
Starts the data source.
-
#stop ⇒ void
Stops the data source.
Constructor Details
#initialize ⇒ NullUpdateProcessor
Creates a new NullUpdateProcessor.
17 18 19 |
# File 'lib/ldclient-rb/impl/data_source/null_processor.rb', line 17 def initialize @ready = Concurrent::Event.new end |
Instance Method Details
#initialized? ⇒ Boolean
Checks if the data source has been initialized.
46 47 48 |
# File 'lib/ldclient-rb/impl/data_source/null_processor.rb', line 46 def initialized? true end |
#start ⇒ Concurrent::Event
Starts the data source. Since this is a null implementation, it immediately sets the ready event to indicate initialization is complete.
27 28 29 30 |
# File 'lib/ldclient-rb/impl/data_source/null_processor.rb', line 27 def start @ready.set @ready end |
#stop ⇒ void
This method returns an undefined value.
Stops the data source. This is a no-op for the null implementation.
37 38 39 |
# File 'lib/ldclient-rb/impl/data_source/null_processor.rb', line 37 def stop # Nothing to do end |