public interface FlagStore
Modifier and Type | Method and Description |
---|---|
void |
applyFlagUpdate(FlagUpdate flagUpdate)
Apply an individual flag update to the FlagStore.
|
void |
applyFlagUpdates(java.util.List<? extends FlagUpdate> flagUpdates)
Apply a list of flag updates to the FlagStore.
|
void |
clear()
Remove all flags from the store.
|
void |
clearAndApplyFlagUpdates(java.util.List<? extends FlagUpdate> flagUpdates)
First removes all flags from the store, then applies a list of flag updates to the
FlagStore.
|
boolean |
containsKey(java.lang.String key)
Returns true if a flag with the key is in the store, otherwise false.
|
void |
delete()
Delete the backing persistent store for this identifier entirely.
|
java.util.Collection<Flag> |
getAllFlags()
Gets all flags currently in the store.
|
Flag |
getFlag(java.lang.String flagKey)
Get an individual flag from the store.
|
void |
registerOnStoreUpdatedListener(StoreUpdatedListener storeUpdatedListener)
Register a listener to be called on any updates to the store.
|
void |
unregisterOnStoreUpdatedListener()
Remove the currently registered listener if one exists.
|
void delete()
void clear()
boolean containsKey(java.lang.String key)
key
- The key to check for membership in the store.@Nullable Flag getFlag(java.lang.String flagKey)
flagKey
- The key to get the corresponding flag for.void applyFlagUpdate(FlagUpdate flagUpdate)
flagUpdate
- The FlagUpdate to apply.void applyFlagUpdates(java.util.List<? extends FlagUpdate> flagUpdates)
flagUpdates
- The list of FlagUpdates to apply.void clearAndApplyFlagUpdates(java.util.List<? extends FlagUpdate> flagUpdates)
flagUpdates
- The list of FlagUpdates to apply.java.util.Collection<Flag> getAllFlags()
void registerOnStoreUpdatedListener(StoreUpdatedListener storeUpdatedListener)
storeUpdatedListener
- The listener to be called on store updates.void unregisterOnStoreUpdatedListener()