public static interface BigSegmentStoreTypes.Membership
BigSegmentStore.getMembership(String)
.
It is associated with a single user, and provides the ability to check whether that user is included in or excluded from any number of Big Segments.
This is an immutable snapshot of the state for this user at the time
BigSegmentStore.getMembership(String)
was called. Calling
checkMembership(String)
should not cause the state to be queried again.
Implementations should be safe for concurrent access by multiple threads.
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
checkMembership(java.lang.String segmentRef)
Tests whether the user is explicitly included or explicitly excluded in the specified
segment, or neither.
|
java.lang.Boolean checkMembership(java.lang.String segmentRef)
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 user is explicitly included (regardless of whether the user is also explicitly
excluded or not-- that is, inclusion takes priority over exclusion), the method returns a
true
value.
If the user is explicitly excluded, and is not explicitly included, the method returns a
false
value.
If the user's status in the segment is undefined, the method returns null
.
segmentRef
- a string representing the segment query