站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

StandardQueryCache (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.cache
Class StandardQueryCache

java.lang.Object
  extended bynet.sf.hibernate.cache.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.

Author:
Gavin King

Constructor Summary
StandardQueryCache(CacheProvider provider, Properties props, UpdateTimestampsCache updateTimestampsCache, String regionName)
           
 
Method Summary
 void clear()
           
 void destroy()
           
 List get(QueryKey key, Type[] returnTypes, Set spaces, SessionImplementor session)
           
protected  boolean isUpToDate(Set spaces, Long timestamp)
           
 void put(QueryKey key, Type[] returnTypes, List result, SessionImplementor session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardQueryCache

public StandardQueryCache(CacheProvider provider,
                          Properties props,
                          UpdateTimestampsCache updateTimestampsCache,
                          String regionName)
                   throws HibernateException
Method Detail

clear

public void clear()
           throws CacheException
Specified by:
clear in interface QueryCache
Throws:
CacheException

put

public void put(QueryKey key,
                Type[] returnTypes,
                List result,
                SessionImplementor session)
         throws HibernateException
Specified by:
put in interface QueryCache
Throws:
HibernateException

get

public List get(QueryKey key,
                Type[] returnTypes,
                Set spaces,
                SessionImplementor session)
         throws HibernateException
Specified by:
get in interface QueryCache
Throws:
HibernateException

isUpToDate

protected boolean isUpToDate(Set spaces,
                             Long timestamp)
                      throws HibernateException
Throws:
HibernateException

destroy

public void destroy()
Specified by:
destroy in interface QueryCache