|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.cache.EhCacheQueryCache
public class EhCacheQueryCache
| Field Summary | |
|---|---|
protected CacheManager |
cacheManager
|
| Constructor Summary | |
|---|---|
EhCacheQueryCache()
|
|
EhCacheQueryCache(CacheManager cacheManager)
|
|
EhCacheQueryCache(java.lang.String configFile)
|
|
| 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. |
Ehcache |
getDefaultCache()
Returns default cache group. |
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. |
void |
shutdown()
Shuts down EhCache CacheManager |
int |
size()
Returns the number of entries currently in the cache, including expired but not removed entries. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected CacheManager cacheManager
| Constructor Detail |
|---|
public EhCacheQueryCache()
public EhCacheQueryCache(java.lang.String configFile)
public EhCacheQueryCache(CacheManager cacheManager)
| Method Detail |
|---|
public java.util.List get(QueryMetadata metadata)
QueryCache
get in interface QueryCache
public java.util.List get(QueryMetadata metadata,
QueryCacheEntryFactory factory)
QueryCacheQueryCache.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.
get in interface QueryCache
public void put(QueryMetadata metadata,
java.util.List results)
put in interface QueryCachepublic void remove(java.lang.String key)
QueryCache
remove in interface QueryCachepublic void removeGroup(java.lang.String groupKey)
QueryCache
removeGroup in interface QueryCachepublic void clear()
QueryCache
clear in interface QueryCachepublic int size()
QueryCache
size in interface QueryCachepublic Ehcache getDefaultCache()
@BeforeScopeEnd public void shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||