Class: LaunchDarkly::Interfaces::BigSegmentStoreStatus

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

Overview

Information about the status of a Big Segment store, provided by BigSegmentStoreStatusProvider.

Big Segments are a specific type of segments. For more information, read the LaunchDarkly documentation: docs.launchdarkly.com/home/users/big-segments

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(available, stale) ⇒ BigSegmentStoreStatus

Returns a new instance of BigSegmentStoreStatus.



486
487
488
489
# File 'lib/ldclient-rb/interfaces.rb', line 486

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

Instance Attribute Details

#availableBoolean (readonly)

True if the Big Segment store is able to respond to queries, so that the SDK can evaluate whether a context is in a segment or not.

If this property is false, the store is not able to make queries (for instance, it may not have a valid database connection). In this case, the SDK will treat any reference to a Big Segment as if no contexts are included in that segment. Also, the EvaluationReason associated with with any flag evaluation that references a Big Segment when the store is not available will have a ‘big_segments_status` of `STORE_ERROR`.

Returns:

  • (Boolean)


501
502
503
# File 'lib/ldclient-rb/interfaces.rb', line 501

def available
  @available
end

#staleBoolean (readonly)

True if the Big Segment store is available, but has not been updated within the amount of time specified by BigSegmentsConfig#stale_after.

This may indicate that the LaunchDarkly Relay Proxy, which populates the store, has stopped running or has become unable to receive fresh data from LaunchDarkly. Any feature flag evaluations that reference a Big Segment will be using the last known data, which may be out of date. Also, the EvaluationReason associated with those evaluations will have a ‘big_segments_status` of `STALE`.

Returns:

  • (Boolean)


513
514
515
# File 'lib/ldclient-rb/interfaces.rb', line 513

def stale
  @stale
end

Instance Method Details

#==(other) ⇒ Object



515
516
517
# File 'lib/ldclient-rb/interfaces.rb', line 515

def ==(other)
  self.available == other.available && self.stale == other.stale
end