Package org.hibernate.cache.spi
Interface QueryResultsCache
-
- All Known Implementing Classes:
QueryResultsCacheImpl
public interface QueryResultsCacheDefines the responsibility for managing query result data caching in regards to a specific region.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclear()Clear items from the query cache.default voiddestroy()List<?>get(QueryKey key, String[] spaces, SharedSessionContractImplementor session)Get results from the cache.List<?>get(QueryKey key, Set<String> spaces, SharedSessionContractImplementor session)Get results from the cache.QueryResultsRegiongetRegion()The underlying cache region being used.booleanput(QueryKey key, List<?> result, SharedSessionContractImplementor session)Put a result into the query cache.
-
-
-
Method Detail
-
getRegion
QueryResultsRegion getRegion()
The underlying cache region being used.
-
put
boolean put(QueryKey key, List<?> result, SharedSessionContractImplementor session) throws HibernateException
Put a result into the query cache.- Parameters:
key- The cache keyresult- The results to cachesession- The originating session- Returns:
- Whether the put actually happened.
- Throws:
HibernateException- Indicates a problem delegating to the underlying cache.
-
get
List<?> get(QueryKey key, Set<String> spaces, SharedSessionContractImplementor session) throws HibernateException
Get results from the cache.- Parameters:
key- The cache keyspaces- 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
List<?> get(QueryKey key, String[] spaces, SharedSessionContractImplementor session) throws HibernateException
Get results from the cache.- Parameters:
key- The cache keyspaces- 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.
-
clear
default void clear() throws CacheExceptionClear items from the query cache.- Throws:
CacheException- Indicates a problem delegating to the underlying cache.
-
destroy
default void destroy()
-
-