Class: LaunchDarkly::Impl::DataSource::NullUpdateProcessor

Inherits:
Object
  • Object
show all
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.

Since:

  • 5.5.0

Instance Method Summary collapse

Constructor Details

#initializeNullUpdateProcessor

Creates a new NullUpdateProcessor.

Since:

  • 5.5.0



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.

Returns:

  • (Boolean)

    Always returns true since this is a null implementation

Since:

  • 5.5.0



46
47
48
# File 'lib/ldclient-rb/impl/data_source/null_processor.rb', line 46

def initialized?
  true
end

#startConcurrent::Event

Starts the data source. Since this is a null implementation, it immediately sets the ready event to indicate initialization is complete.

Returns:

  • (Concurrent::Event)

    The ready event

Since:

  • 5.5.0



27
28
29
30
# File 'lib/ldclient-rb/impl/data_source/null_processor.rb', line 27

def start
  @ready.set
  @ready
end

#stopvoid

This method returns an undefined value.

Stops the data source. This is a no-op for the null implementation.

Since:

  • 5.5.0



37
38
39
# File 'lib/ldclient-rb/impl/data_source/null_processor.rb', line 37

def stop
  # Nothing to do
end