Interface ContextQuery

  • All Known Implementing Classes:
    DefaultContextQuery

    public interface ContextQuery
    Object that enables filtering available contexts in cache by their attributes.
    • Method Detail

      • notEmpty

        ContextQuery notEmpty()
        Extends query by adding filter for context configuration. New filter passes only those contexts that contain any configuration.
        Returns:
        extended query
      • matchesAny

        ContextQuery matchesAny​(java.lang.String name,
                                java.util.Collection<java.lang.String> values)
        Extends query by adding filter for specified attribute. New filter passes only those contexts that contains an attribute with specified name and value is one of provided.
        Parameters:
        name - name of attribute to match
        values - collection of possible values
        Returns:
        extended query
      • execute

        java.util.Collection<Context> execute()
        Executes query on cached contexts
        Returns:
        collection of contexts that matches current query or null if no contexts are available in cache