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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(available, stale) ⇒ Status

Returns a new instance of Status.



351
352
353
354
# File 'lib/ldclient-rb/interfaces.rb', line 351

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).

Returns:

  • (Boolean)

    true if store is available



365
366
367
# File 'lib/ldclient-rb/interfaces.rb', line 365

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.

Returns:

  • (Boolean)

    true if data should be rewritten



376
377
378
# File 'lib/ldclient-rb/interfaces.rb', line 376

def stale
  @stale
end