QueryResultsCache, corresponding to
second-level cache regions with distinct policies.
A QueryResultsCache depends on the TimestampsCache
to track invalidation of the query spaces (tables) which affect the
cached queries. A cached query result list is considered stale
if any one of the query spaces which affect the query results was
invalidated since the result
list was read from the database and stored in the
query result cache.
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public default void | |
| public List | Returns: The cached results; may be null if there are no cached results for the given key, or if the results are stale.The cache key uniquely identifying the query and its
bound parameter arguments key, Set<String> The query spaces which affect the results of the
query (used to check if cached results are stale) spaces, SharedSessionContractImplementor The originating session session)Attempt to retrieve a cached query result list for the given
|
| public List | Returns: The cached results; may be null.The cache key uniquely identifying the query and its
bound parameter arguments key, String[] The query spaces which affect the results of the
query (used to check if cached results are stale) spaces, SharedSessionContractImplementor The originating session session)Attempt to retrieve a cached query result list for the given
|
| public QueryResultsRegion | |
| public boolean | Returns: Whether the put actually happened.The cache key uniquely identifying the query and its
bound parameter arguments key, List<?> The result list to cache result, SharedSessionContractImplementor The originating session session)Store a result list of a query with the given |
| clear | back to summary |
|---|---|
| public default void clear() throws CacheException Clear all items from this query result cache.
| |
| destroy | back to summary |
|---|---|
| public default void destroy() | |
| get | back to summary |
|---|---|
| public List Attempt to retrieve a cached query result list for the given
| |
| get | back to summary |
|---|---|
| public List Attempt to retrieve a cached query result list for the given
| |
| getRegion | back to summary |
|---|---|
| public QueryResultsRegion getRegion() The underlying cache region being used. | |
| put | back to summary |
|---|---|
| public boolean put(QueryKey key, List<?> result, SharedSessionContractImplementor session) throws HibernateException Store a result list of a query with the given
| |