Interface BigSegmentStoreTypes.IMembership
A query interface returned by GetMembershipAsync(string).
Namespace: LaunchDarkly.Sdk.Server.Subsystems
Assembly: LaunchDarkly.ServerSdk.dll
Syntax
public interface BigSegmentStoreTypes.IMembership
Remarks
It is associated with a single context, and provides the ability to check whether that context is included in or excluded from any number of Big Segments.
This is an immutable snapshot of the state for this context at the time GetMembershipAsync(string) was called. Calling CheckMembership(string) should not cause the state to be queried again. The object should be safe for concurrent access by multiple threads.
Methods
| Edit this page View SourceCheckMembership(string)
Tests whether the context is explicitly included or explicitly excluded in the specified segment, or neither.
Declaration
bool? CheckMembership(string segmentRef)
Parameters
Type | Name | Description |
---|---|---|
string | segmentRef | a string representing the segment query |
Returns
Type | Description |
---|---|
bool? | true/false membership state, or null if unspecified |
Remarks
The segment is identified by a
segmentRef
which is not the same as
the segment key: it includes the key but also versioning information that the SDK
will provide. The store implementation should not be concerned with the format of
this.
If the context is explicitly included (regardless of whether the context is also explicitly excluded or not-- that is, inclusion takes priority over exclusion), the method returns a true value.
If the context is explicitly excluded, and is not explicitly included, the method returns a false value.
If the context's status in the segment is undefined, the method returns null.