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

Inherits:
Object
  • Object
show all
Includes:
LaunchDarkly::Interfaces::DataSource
Defined in:
lib/ldclient-rb/impl/data_source/null_processor.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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 is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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