public interface QueryCache
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deprecated.
since 4.0. Please use implementation specific methods to perform cache management tasks.
|
List |
get(QueryMetadata metadata)
Returns a cached query result for the given QueryMetadata or null if the result is
not cached or is expired.
|
List |
get(QueryMetadata metadata,
QueryCacheEntryFactory factory)
Returns a cached query result for the given QueryMetadata.
|
void |
put(QueryMetadata metadata,
List results) |
void |
remove(String key)
Removes a single entry from cache.
|
void |
removeGroup(String groupKey)
Removes a group of entries identified by group key.
|
void |
removeGroup(String groupKey,
Class<?> keyType,
Class<?> valueType)
Removes a group of entries identified by group key.
|
int |
size()
Deprecated.
since 4.0. Please use implementation specific methods to perform cache management tasks.
|
List get(QueryMetadata metadata)
List get(QueryMetadata metadata, QueryCacheEntryFactory factory)
Compared to get(QueryMetadata)
, this method allows the cache to do
appropriate synchronization when refreshing the entry, preventing multiple threads
from running the same query when a missing entry is requested by multiple threads
simultaneously.
void put(QueryMetadata metadata, List results)
void remove(String key)
void removeGroup(String groupKey)
void removeGroup(String groupKey, Class<?> keyType, Class<?> valueType)
removeGroup(String)
@Deprecated void clear()
@Deprecated int size()
Copyright © 2001–2018 Apache Cayenne. All rights reserved.