Class: LaunchDarkly::Interfaces::DataStore::Status

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(available, stale) ⇒ Status



84
85
86
87
# File 'lib/ldclient-rb/interfaces/data_store.rb', line 84

def initialize(available, stale)
  @available = available
  @stale = stale
end

Instance Attribute Details

#availableBoolean (readonly)

Returns true if the SDK believes the data store is now available.

This property is normally true. If the SDK receives an exception while trying to query or update the data store, then it sets this property to false (notifying listeners, if any) and polls the store at intervals until a query succeeds. Once it succeeds, it sets the property back to true (again notifying listeners).



98
99
100
# File 'lib/ldclient-rb/interfaces/data_store.rb', line 98

def available
  @available
end

#staleBoolean (readonly)

Returns true if the store may be out of date due to a previous outage, so the SDK should attempt to refresh all feature flag data and rewrite it to the store.

This property is not meaningful to application code.



109
110
111
# File 'lib/ldclient-rb/interfaces/data_store.rb', line 109

def stale
  @stale
end