Package org.hibernate.cache
Class StandardQueryCache
java.lang.Object
org.hibernate.cache.StandardQueryCache
- All Implemented Interfaces:
QueryCache
The standard implementation of the Hibernate QueryCache interface. This
implementation is very good at recognizing stale query results and
and re-running queries when it detects this condition, recaching the new
results.
-
Constructor Summary
ConstructorsConstructorDescriptionStandardQueryCache(Settings settings, Properties props, UpdateTimestampsCache updateTimestampsCache, String regionName) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voiddestroy()get(QueryKey key, Type[] returnTypes, boolean isNaturalKeyLookup, Set spaces, SessionImplementor session) protected booleanisUpToDate(Set spaces, Long timestamp) booleanput(QueryKey key, Type[] returnTypes, List result, boolean isNaturalKeyLookup, SessionImplementor session) toString()
-
Constructor Details
-
StandardQueryCache
public StandardQueryCache(Settings settings, Properties props, UpdateTimestampsCache updateTimestampsCache, String regionName) throws HibernateException - Throws:
HibernateException
-
-
Method Details
-
clear
- Specified by:
clearin interfaceQueryCache- Throws:
CacheException
-
put
public boolean put(QueryKey key, Type[] returnTypes, List result, boolean isNaturalKeyLookup, SessionImplementor session) throws HibernateException - Specified by:
putin interfaceQueryCache- Throws:
HibernateException
-
get
public List get(QueryKey key, Type[] returnTypes, boolean isNaturalKeyLookup, Set spaces, SessionImplementor session) throws HibernateException - Specified by:
getin interfaceQueryCache- Throws:
HibernateException
-
isUpToDate
-
destroy
public void destroy()- Specified by:
destroyin interfaceQueryCache
-
getRegion
- Specified by:
getRegionin interfaceQueryCache
-
toString
-