Class: LaunchDarkly::Impl::DataStore::StatusProvider Private

Inherits:
Object
  • Object
show all
Includes:
LaunchDarkly::Interfaces::DataStore::StatusProvider
Defined in:
lib/ldclient-rb/impl/data_store/data_kind.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.

Since:

  • 5.5.0

Instance Method Summary collapse

Constructor Details

#initialize(store, update_sink) ⇒ StatusProvider

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.

Returns a new instance of StatusProvider.

Since:

  • 5.5.0



59
60
61
62
63
64
# File 'lib/ldclient-rb/impl/data_store/data_kind.rb', line 59

def initialize(store, update_sink)
  # @type [LaunchDarkly::Impl::FeatureStoreClientWrapper]
  @store = store
  # @type [UpdateSink]
  @update_sink = update_sink
end

Instance Method Details

#add_listener(listener) ⇒ Object

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.

Since:

  • 5.5.0



74
75
76
# File 'lib/ldclient-rb/impl/data_store/data_kind.rb', line 74

def add_listener(listener)
  @update_sink.broadcaster.add_listener(listener)
end

#monitoring_enabled?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.

Returns:

  • (Boolean)

Since:

  • 5.5.0



70
71
72
# File 'lib/ldclient-rb/impl/data_store/data_kind.rb', line 70

def monitoring_enabled?
  @store.monitoring_enabled?
end

#remove_listener(listener) ⇒ Object

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.

Since:

  • 5.5.0



78
79
80
# File 'lib/ldclient-rb/impl/data_store/data_kind.rb', line 78

def remove_listener(listener)
  @update_sink.broadcaster.remove_listener(listener)
end

#statusObject

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.

Since:

  • 5.5.0



66
67
68
# File 'lib/ldclient-rb/impl/data_store/data_kind.rb', line 66

def status
  @update_sink.last_status.get
end