public interface FlagStoreManager
Modifier and Type | Method and Description |
---|---|
FlagStore |
getCurrentUserStore()
Gets the current user's flag store.
|
java.util.Collection<FeatureFlagChangeListener> |
getListenersByKey(java.lang.String key)
Gets all the listeners currently registered to the given key.
|
void |
registerAllFlagsListener(LDAllFlagsListener listener)
Register a listener to be called whenever new flag data is received.
|
void |
registerListener(java.lang.String key,
FeatureFlagChangeListener listener)
Register a listener to be called when a flag with the given key is created or updated.
|
void |
switchToUser(java.lang.String userKey)
Loads the FlagStore for the particular userKey.
|
void |
unregisterAllFlagsListener(LDAllFlagsListener listener)
Unregister a listener previously registered with registerAllFlagsListener.
|
void |
unRegisterListener(java.lang.String key,
FeatureFlagChangeListener listener)
Unregister a specific listener registered to the given key.
|
void switchToUser(java.lang.String userKey)
userKey
- The key representing the user to switch toFlagStore getCurrentUserStore()
void registerListener(java.lang.String key, FeatureFlagChangeListener listener)
key
- Flag key to register the listener to.listener
- The listener to be called when the flag is updated.void unRegisterListener(java.lang.String key, FeatureFlagChangeListener listener)
key
- Flag key to unregister the listener from.listener
- The specific listener to be unregistered.void registerAllFlagsListener(LDAllFlagsListener listener)
listener
- The listener to be called new flag data is received.void unregisterAllFlagsListener(LDAllFlagsListener listener)
listener
- The specific listener to be unregistered.java.util.Collection<FeatureFlagChangeListener> getListenersByKey(java.lang.String key)
key
- The key to return the listeners for.