Interface QueryResultsCache

  • All Superinterfaces:
    QueryCache

    public interface QueryResultsCache
    extends QueryCache
    Defines the responsibility for managing query result data caching in regards to a specific region.
    • Method Detail

      • put

        boolean put​(QueryKey key,
                    java.util.List result,
                    Type[] returnTypes,
                    SharedSessionContractImplementor session)
             throws HibernateException
        Put a result into the query cache.
        Parameters:
        key - The cache key
        result - The results to cache
        session - The originating session
        Returns:
        Whether the put actually happened.
        Throws:
        HibernateException - Indicates a problem delegating to the underlying cache.
      • get

        java.util.List get​(QueryKey key,
                           java.util.Set<java.io.Serializable> spaces,
                           Type[] returnTypes,
                           SharedSessionContractImplementor session)
                    throws HibernateException
        Get results from the cache.
        Parameters:
        key - The cache key
        spaces - The query spaces (used in invalidation plus validation checks)
        session - The originating session
        Returns:
        The cached results; may be null.
        Throws:
        HibernateException - Indicates a problem delegating to the underlying cache.
      • get

        java.util.List get​(QueryKey key,
                           java.lang.String[] spaces,
                           Type[] returnTypes,
                           SharedSessionContractImplementor session)
                    throws HibernateException
        Get results from the cache.
        Parameters:
        key - The cache key
        spaces - The query spaces (used in invalidation plus validation checks)
        session - The originating session
        Returns:
        The cached results; may be null.
        Throws:
        HibernateException - Indicates a problem delegating to the underlying cache.
      • put

        default boolean put​(QueryKey key,
                            Type[] returnTypes,
                            java.util.List result,
                            boolean isNaturalKeyLookup,
                            SharedSessionContractImplementor session)
        Description copied from interface: QueryCache
        Put a result into the query cache.
        Specified by:
        put in interface QueryCache
        Parameters:
        key - The cache key
        returnTypes - The result types
        result - The results to cache
        isNaturalKeyLookup - Was this a natural id lookup?
        session - The originating session
        Returns:
        Whether the put actually happened.
      • get

        default java.util.List get​(QueryKey key,
                                   Type[] returnTypes,
                                   boolean isNaturalKeyLookup,
                                   java.util.Set<java.io.Serializable> spaces,
                                   SharedSessionContractImplementor session)
        Description copied from interface: QueryCache
        Get results from the cache.
        Specified by:
        get in interface QueryCache
        Parameters:
        key - The cache key
        returnTypes - The result types
        isNaturalKeyLookup - Was this a natural id lookup?
        spaces - The query spaces (used in invalidation plus validation checks)
        session - The originating session
        Returns:
        The cached results; may be null.
      • destroy

        default void destroy()
        Description copied from interface: QueryCache
        Destroy the cache.
        Specified by:
        destroy in interface QueryCache