Package org.hibernate.cache.spi
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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
clear()
Clear items from the query cache.default void
destroy()
Destroy the cache.java.util.List
get(QueryKey key, java.lang.String[] spaces, Type[] returnTypes, SharedSessionContractImplementor session)
Get results from the cache.java.util.List
get(QueryKey key, java.util.Set<java.io.Serializable> spaces, Type[] returnTypes, SharedSessionContractImplementor session)
Get results from the cache.default java.util.List
get(QueryKey key, Type[] returnTypes, boolean isNaturalKeyLookup, java.util.Set<java.io.Serializable> spaces, SharedSessionContractImplementor session)
Get results from the cache.QueryResultsRegion
getRegion()
The underlying cache region being used.boolean
put(QueryKey key, java.util.List result, Type[] returnTypes, SharedSessionContractImplementor session)
Put a result into the query cache.default boolean
put(QueryKey key, Type[] returnTypes, java.util.List result, boolean isNaturalKeyLookup, SharedSessionContractImplementor session)
Put a result into the query cache.
-
-
-
Method Detail
-
getRegion
QueryResultsRegion getRegion()
The underlying cache region being used.- Specified by:
getRegion
in interfaceQueryCache
- Returns:
- The cache region.
-
clear
default void clear() throws CacheException
Clear items from the query cache.- Specified by:
clear
in interfaceQueryCache
- Throws:
CacheException
- Indicates a problem delegating to the underlying cache.
-
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 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
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 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
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 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.
-
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 interfaceQueryCache
- Parameters:
key
- The cache keyreturnTypes
- The result typesresult
- The results to cacheisNaturalKeyLookup
- 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 interfaceQueryCache
- Parameters:
key
- The cache keyreturnTypes
- The result typesisNaturalKeyLookup
- 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 interfaceQueryCache
-
-