Class: LaunchDarkly::Interfaces::BigSegmentStoreStatus
- Inherits:
-
Object
- Object
- LaunchDarkly::Interfaces::BigSegmentStoreStatus
- 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
-
#available ⇒ Boolean
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.
-
#stale ⇒ Boolean
readonly
True if the Big Segment store is available, but has not been updated within the amount of time specified by BigSegmentsConfig#stale_after.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(available, stale) ⇒ BigSegmentStoreStatus
constructor
A new instance of BigSegmentStoreStatus.
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
#available ⇒ Boolean (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`.
501 502 503 |
# File 'lib/ldclient-rb/interfaces.rb', line 501 def available @available end |
#stale ⇒ Boolean (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`.
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 |