public interface QueryResultsCache extends QueryCache
Modifier and Type | Method and Description |
---|---|
default void |
clear()
Clear items from the query cache.
|
default void |
destroy()
Destroy the cache.
|
List |
get(QueryKey key,
Set<Serializable> spaces,
Type[] returnTypes,
SharedSessionContractImplementor session)
Get results from the cache.
|
List |
get(QueryKey key,
String[] spaces,
Type[] returnTypes,
SharedSessionContractImplementor session)
Get results from the cache.
|
default List |
get(QueryKey key,
Type[] returnTypes,
boolean isNaturalKeyLookup,
Set<Serializable> spaces,
SharedSessionContractImplementor session)
Get results from the cache.
|
QueryResultsRegion |
getRegion()
The underlying cache region being used.
|
boolean |
put(QueryKey key,
List result,
Type[] returnTypes,
SharedSessionContractImplementor session)
Put a result into the query cache.
|
default boolean |
put(QueryKey key,
Type[] returnTypes,
List result,
boolean isNaturalKeyLookup,
SharedSessionContractImplementor session)
Put a result into the query cache.
|
QueryResultsRegion getRegion()
getRegion
in interface QueryCache
default void clear() throws CacheException
clear
in interface QueryCache
CacheException
- Indicates a problem delegating to the underlying cache.boolean put(QueryKey key, List result, Type[] returnTypes, SharedSessionContractImplementor session) throws HibernateException
key
- The cache keyresult
- The results to cachesession
- The originating sessionHibernateException
- Indicates a problem delegating to the underlying cache.List get(QueryKey key, Set<Serializable> spaces, Type[] returnTypes, SharedSessionContractImplementor session) throws HibernateException
key
- The cache keyspaces
- The query spaces (used in invalidation plus validation checks)session
- The originating sessionHibernateException
- Indicates a problem delegating to the underlying cache.List get(QueryKey key, String[] spaces, Type[] returnTypes, SharedSessionContractImplementor session) throws HibernateException
key
- The cache keyspaces
- The query spaces (used in invalidation plus validation checks)session
- The originating sessionHibernateException
- Indicates a problem delegating to the underlying cache.default boolean put(QueryKey key, Type[] returnTypes, List result, boolean isNaturalKeyLookup, SharedSessionContractImplementor session)
QueryCache
put
in interface QueryCache
key
- The cache keyreturnTypes
- The result typesresult
- The results to cacheisNaturalKeyLookup
- Was this a natural id lookup?session
- The originating sessiondefault List get(QueryKey key, Type[] returnTypes, boolean isNaturalKeyLookup, Set<Serializable> spaces, SharedSessionContractImplementor session)
QueryCache
get
in interface QueryCache
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 sessiondefault void destroy()
QueryCache
destroy
in interface QueryCache
Copyright © 2001-2022 Red Hat, Inc. All Rights Reserved.