Top Methods
org.hibernate.cache.spi

public Interface QueryCache

Known Direct Subinterfaces
org.hibernate.cache.spi.QueryResultsCache
Annotations
@Deprecated
Imports
java.io.Serializable, java.util.List, .Set, org.hibernate.cache.CacheException, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.type.Type

Deprecated

Use QueryResultsCache instead - CacheImplementor#getQueryResultsCache rather than CacheImplementor#getQueryCache

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Clear items from the query cache.

public void
destroy()

Destroy the cache.

public List<E>

Returns:

The cached results; may be null.
get
(QueryKey
The cache key
key
,
Type[]
The result types
returnTypes
,
boolean
Was this a natural id lookup?
isNaturalKeyLookup
,
Set<Serializable>
The query spaces (used in invalidation plus validation checks)
spaces
,
SharedSessionContractImplementor
The originating session
session
)

Get results from the cache.

public QueryResultsRegion

Returns:

The cache region.
getRegion
()

The underlying cache factory region being used.

public boolean

Returns:

Whether the put actually happened.
put
(QueryKey
The cache key
key
,
Type[]
The result types
returnTypes
,
List<E>
The results to cache
result
,
boolean
Was this a natural id lookup?
isNaturalKeyLookup
,
SharedSessionContractImplementor
The originating session
session
)

Put a result into the query cache.

Method Detail

clearback to summary
public void clear()

Clear items from the query cache.

Exceptions
CacheException:
Indicates a problem delegating to the underlying cache.
destroyback to summary
public void destroy()

Destroy the cache.

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

Get results from the cache.

Parameters
key:QueryKey

The cache key

returnTypes:Type[]

The result types

isNaturalKeyLookup:boolean

Was this a natural id lookup?

spaces:Set<Serializable>

The query spaces (used in invalidation plus validation checks)

session:SharedSessionContractImplementor

The originating session

Returns:List<E>

The cached results; may be null.

getRegionback to summary
public QueryResultsRegion getRegion()

The underlying cache factory region being used.

Returns:QueryResultsRegion

The cache region.

putback to summary
public boolean put(QueryKey key, Type[] returnTypes, List<E> result, boolean isNaturalKeyLookup, SharedSessionContractImplementor session)

Put a result into the query cache.

Parameters
key:QueryKey

The cache key

returnTypes:Type[]

The result types

result:List<E>

The results to cache

isNaturalKeyLookup:boolean

Was this a natural id lookup?

session:SharedSessionContractImplementor

The originating session

Returns:boolean

Whether the put actually happened.