Interface StickyBucketService
- All Known Implementing Classes:
InMemoryStickyBucketServiceImpl
public interface StickyBucketService
Sticky Bucket Service is responsible for persisting previously seen
variations and ensure that the user experience remains consistent for your users.
-
Method Summary
Modifier and TypeMethodDescriptiongetAllAssignments
(Map<String, String> attributes) Method for getting all Assignments by attributes from GBContextgetAssignments
(String attributeName, String attributeValue) Lookup a sticky bucket documentvoid
Insert new record if not exists, otherwise update
-
Method Details
-
getAssignments
Lookup a sticky bucket document- Parameters:
attributeName
- attributeName with attributeValue together present a key that us for find proper StickyAssignmentsDocumentattributeValue
- attributeName with attributeValue together present a key that us for find proper StickyAssignmentsDocument- Returns:
- StickyAssignmentsDocument
-
saveAssignments
Insert new record if not exists, otherwise update- Parameters:
doc
- StickyAssignmentsDocument
-
getAllAssignments
Method for getting all Assignments by attributes from GBContext- Parameters:
attributes
- Map of String key and String value that you have in GBContext- Returns:
- Map with key String and value StickyAssignmentsDocument
-