Class QueryCache

  • Direct Known Subclasses:
    SharedQueryCache

    public class QueryCache
    extends java.lang.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
    • Constructor Detail

      • 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 Detail

      • clear

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

        public java.util.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.