Top Description Fields Constructors Methods
org.hibernate.cache

public Class StandardQueryCache

extends Object
implements QueryCache
Class Inheritance
All Implemented Interfaces
org.hibernate.cache.QueryCache
Imports
java.io.Serializable, java.util.ArrayList, .List, .Properties, .Set, javax.persistence.EntityNotFoundException, org.slf4j.Logger, .LoggerFactory, org.hibernate.HibernateException, .UnresolvableObjectException, org.hibernate.cfg.Settings, org.hibernate.engine.SessionImplementor, org.hibernate.type.Type, .TypeHelper

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.
Authors
Gavin King, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private QueryResultsRegion
private static final Logger
private UpdateTimestampsCache

Constructor Summary

AccessConstructor and Description
public
StandardQueryCache(final Settings settings, final Properties props, final UpdateTimestampsCache updateTimestampsCache, String regionName)

Method Summary

Modifier and TypeMethod and Description
public void
public void
public List<E>
get(QueryKey key, Type[] returnTypes, boolean isNaturalKeyLookup, Set<E> spaces, SessionImplementor session)

Implements org.hibernate.cache.QueryCache.get.

public QueryResultsRegion
protected boolean
isUpToDate(Set<E> spaces, Long timestamp)

public boolean
put(QueryKey key, Type[] returnTypes, List<E> result, boolean isNaturalKeyLookup, SessionImplementor session)

Implements org.hibernate.cache.QueryCache.put.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cacheRegionback to summary
private QueryResultsRegion cacheRegion
logback to summary
private static final Logger log
updateTimestampsCacheback to summary
private UpdateTimestampsCache updateTimestampsCache

Constructor Detail

StandardQueryCacheback to summary
public StandardQueryCache(final Settings settings, final Properties props, final UpdateTimestampsCache updateTimestampsCache, String regionName) throws HibernateException

Method Detail

clearback to summary
public void clear() throws CacheException

Implements org.hibernate.cache.QueryCache.clear.

destroyback to summary
public void destroy()

Implements org.hibernate.cache.QueryCache.destroy.

getback to summary
public List<E> get(QueryKey key, Type[] returnTypes, boolean isNaturalKeyLookup, Set<E> spaces, SessionImplementor session) throws HibernateException

Implements org.hibernate.cache.QueryCache.get.

Annotations
@SuppressWarnings:unchecked
getRegionback to summary
public QueryResultsRegion getRegion()

Implements org.hibernate.cache.QueryCache.getRegion.

isUpToDateback to summary
protected boolean isUpToDate(Set<E> spaces, Long timestamp)
putback to summary
public boolean put(QueryKey key, Type[] returnTypes, List<E> result, boolean isNaturalKeyLookup, SessionImplementor session) throws HibernateException

Implements org.hibernate.cache.QueryCache.put.

Annotations
@SuppressWarnings:UnnecessaryBoxing, unchecked
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.