Class QueryCache

java.lang.Object
net.ssehub.easy.varModel.confModel.QueryCache
Direct Known Subclasses:
SharedQueryCache

public class QueryCache extends Object
A cache for ConfigQuerys based on a Configuration. As long the configuration is not recreated, the cache will store already retrieved values.
Author:
El-Sharkawy
  • Field Details

  • Constructor Details

    • QueryCache

      protected QueryCache()
      Should only be used for inheritance.
    • QueryCache

      QueryCache(Configuration config)
      Default constructor for this class, creates an empty cache.
      Parameters:
      config - The configuration for which this cache is used.
  • Method Details

    • clear

      void clear()
      Clears the cache, must be called from the configuration after the configuration was refreshed.
    • getPossibleValues

      public List<ConstraintSyntaxTree> getPossibleValues(Reference refType)
      Calculates possible values (ConstraintSyntaxTree-based) for a given Reference variable.
      Parameters:
      refType - The reference for which possible values should be calculated for.
      Returns:
      A maybe empty list of possible values for the given Reference. This list is unmodifiable and should not be stored outside of this cache.