|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface QueryCache
An interface that defines generic QueryCache.
Note that depending on implementation, remove(String)
,
removeGroup(String)
and clear()
methods may mark the matching
existing entries as expired instead of actually removing them. So it may appear that
the size of the cache, as reported by size()
method, is unchanged.
Method Summary | |
---|---|
void |
clear()
Clears all cache entries. |
java.util.List |
get(QueryMetadata metadata)
Returns a cached query result for the given QueryMetadata or null if the result is not cached or is expired. |
java.util.List |
get(QueryMetadata metadata,
QueryCacheEntryFactory factory)
Returns a cached query result for the given QueryMetadata. |
void |
put(QueryMetadata metadata,
java.util.List results)
|
void |
remove(java.lang.String key)
Removes a single entry from cache. |
void |
removeGroup(java.lang.String groupKey)
Removes a group of entries identified by group key. |
int |
size()
Returns the number of entries currently in the cache, including expired but not removed entries. |
Method Detail |
---|
java.util.List get(QueryMetadata metadata)
java.util.List get(QueryMetadata metadata, QueryCacheEntryFactory factory)
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, java.util.List results)
void remove(java.lang.String key)
void removeGroup(java.lang.String groupKey)
void clear()
int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |