public class StandardQueryCache extends java.lang.Object implements QueryCache
| Constructor and Description |
|---|
StandardQueryCache(QueryResultsRegion cacheRegion,
CacheImplementor cacheManager) |
StandardQueryCache(SessionFactoryOptions settings,
java.util.Properties props,
UpdateTimestampsCache updateTimestampsCache,
java.lang.String regionName)
Constructs a StandardQueryCache instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear items from the query cache.
|
void |
destroy()
Destroy the cache.
|
java.util.List |
get(QueryKey key,
Type[] returnTypes,
boolean isNaturalKeyLookup,
java.util.Set<java.io.Serializable> spaces,
SharedSessionContractImplementor session)
Get results from the cache.
|
QueryResultsRegion |
getRegion()
The underlying cache factory region being used.
|
protected boolean |
isUpToDate(java.util.Set<java.io.Serializable> spaces,
java.lang.Long timestamp,
SharedSessionContractImplementor session) |
boolean |
put(QueryKey key,
Type[] returnTypes,
java.util.List result,
boolean isNaturalKeyLookup,
SharedSessionContractImplementor session)
Put a result into the query cache.
|
java.lang.String |
toString() |
public StandardQueryCache(SessionFactoryOptions settings, java.util.Properties props, UpdateTimestampsCache updateTimestampsCache, java.lang.String regionName)
settings - The SessionFactory settings.props - Any propertiesupdateTimestampsCache - The update-timestamps cache to use.regionName - The base query cache region namepublic StandardQueryCache(QueryResultsRegion cacheRegion, CacheImplementor cacheManager)
public QueryResultsRegion getRegion()
QueryCachegetRegion in interface QueryCachepublic void destroy()
QueryCachedestroy in interface QueryCachepublic void clear()
throws CacheException
QueryCacheclear in interface QueryCacheCacheException - Indicates a problem delegating to the underlying cache.public boolean put(QueryKey key, Type[] returnTypes, java.util.List result, boolean isNaturalKeyLookup, SharedSessionContractImplementor session) throws HibernateException
QueryCacheput in interface QueryCachekey - The cache keyreturnTypes - The result typesresult - The results to cacheisNaturalKeyLookup - Was this a natural id lookup?session - The originating sessionHibernateException - Indicates a problem delegating to the underlying cache.public java.util.List get(QueryKey key, Type[] returnTypes, boolean isNaturalKeyLookup, java.util.Set<java.io.Serializable> spaces, SharedSessionContractImplementor session) throws HibernateException
QueryCacheget in interface QueryCachekey - 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 sessionHibernateException - Indicates a problem delegating to the underlying cache.protected boolean isUpToDate(java.util.Set<java.io.Serializable> spaces,
java.lang.Long timestamp,
SharedSessionContractImplementor session)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.