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 Details

    • getAssignments

      StickyAssignmentsDocument getAssignments(String attributeName, String attributeValue)
      Lookup a sticky bucket document
      Parameters:
      attributeName - attributeName with attributeValue together present a key that us for find proper StickyAssignmentsDocument
      attributeValue - attributeName with attributeValue together present a key that us for find proper StickyAssignmentsDocument
      Returns:
      StickyAssignmentsDocument
    • saveAssignments

      void saveAssignments(StickyAssignmentsDocument doc)
      Insert new record if not exists, otherwise update
      Parameters:
      doc - StickyAssignmentsDocument
    • getAllAssignments

      Map<String,StickyAssignmentsDocument> getAllAssignments(Map<String,String> attributes)
      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