public interface BigSegmentStore
extends java.io.Closeable
Big Segments are a specific type of user segments. For more information, read the LaunchDarkly documentation .
Modifier and Type | Method and Description |
---|---|
BigSegmentStoreTypes.Membership |
getMembership(java.lang.String userHash)
Queries the store for a snapshot of the current segment state for a specific user.
|
BigSegmentStoreTypes.StoreMetadata |
getMetadata()
Returns information about the overall state of the store.
|
BigSegmentStoreTypes.Membership getMembership(java.lang.String userHash)
The userHash
is a base64-encoded string produced by hashing the user key as defined by
the Big Segments specification; the store implementation does not need to know the details of
how this is done, because it deals only with already-hashed keys, but the string can be assumed
to only contain characters that are valid in base64.
If the store is working, but no membership state is found for this user, the method may return
either null
or an empty BigSegmentStoreTypes.Membership
. It should not throw an
exception unless there is an unexpected database error or the retrieved data is malformed.
userHash
- the hashed user identifiernull
BigSegmentStoreTypes.StoreMetadata getMetadata()
This method will be called only when the SDK needs the latest state, so it should not be cached.
If the store is working, but no metadata has been stored in it yet, the method should return
null
. It should not throw an exception unless there is an unexpected database error or
the retrieved data is malformed.