Interface ExperimentsCache


public interface ExperimentsCache
An interface for retrieving active experiments and treatments information, real-time. Must be optimized and fast as this will be called many times, ideally caching internally as needed.
  • Method Details

    • getActiveExperiments

      Map<String,Experiment> getActiveExperiments()
      Return active experiments
      Returns:
      all active experiments
    • invalidateAll

      void invalidateAll(Experiment.BuilderFactory factory)
      Forces cache to reload all data from storage
    • invalidate

      void invalidate(String experimentName, Experiment.Builder builder)
      Forces cache to reload a specific experiment from storage
    • update

      void update(Experiment experiment)
      Updates the cache with a newly loaded experiment
    • delete

      void delete(String experimentName)
      Updates the cache with a recently deleted experiment
    • checkIfAnyStale

      boolean checkIfAnyStale()
      Checks whether any experiments are stale
    • checkIfStale

      boolean checkIfStale(String experimentName)
      Checks whether a given experiment is stale