org.hibernate.cache.internal
Class StandardQueryCache
java.lang.Object
org.hibernate.cache.internal.StandardQueryCache
- All Implemented Interfaces:
- QueryCache
public class StandardQueryCache
- extends Object
- implements 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.
StandardQueryCache
public StandardQueryCache(Settings settings,
Properties props,
UpdateTimestampsCache updateTimestampsCache,
String regionName)
throws HibernateException
- Throws:
HibernateException
clear
public void clear()
throws CacheException
- Specified by:
clear
in interface QueryCache
- Throws:
CacheException
put
public boolean put(QueryKey key,
Type[] returnTypes,
List result,
boolean isNaturalKeyLookup,
SessionImplementor session)
throws HibernateException
- Specified by:
put
in interface QueryCache
- Throws:
HibernateException
get
public List get(QueryKey key,
Type[] returnTypes,
boolean isNaturalKeyLookup,
Set spaces,
SessionImplementor session)
throws HibernateException
- Specified by:
get
in interface QueryCache
- Throws:
HibernateException
isUpToDate
protected boolean isUpToDate(Set spaces,
Long timestamp)
destroy
public void destroy()
- Specified by:
destroy
in interface QueryCache
getRegion
public QueryResultsRegion getRegion()
- Specified by:
getRegion
in interface QueryCache
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.