@Component(value="cuba_QueryCache") public class StandardQueryCache extends java.lang.Object implements QueryCache
NAME| Constructor and Description |
|---|
StandardQueryCache() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<QueryKey,QueryResult> |
asMap()
Returns a view of the entries stored in this cache as a map.
|
QueryKey |
findQueryKeyById(java.util.UUID queryId)
Finds query key by query identifier
|
QueryResult |
get(QueryKey queryKey)
Returns the query results associated with
queryKey in this cache |
long |
getMaxSize()
Returns the maximum number of entries the cache may contain.
|
void |
invalidate(QueryKey queryKey)
Discards cached query results for query key
queryKey. |
void |
invalidate(java.util.Set<java.lang.String> typeNames)
Discards cached query results for metaClass names
typeNames. |
void |
invalidate(java.lang.String typeName)
Discards cached query results for metaClass name
typeName. |
QueryKey |
invalidate(java.util.UUID queryId)
Discards cached query results for query identifier
queryKey. |
void |
invalidateAll()
Discards all queries results in the cache.
|
void |
put(QueryKey queryKey,
QueryResult queryResult)
Associates
queryResult with queryKey in this cache |
long |
size()
Returns number of entries in this cache.
|
public QueryResult get(QueryKey queryKey)
QueryCachequeryKey in this cacheget in interface QueryCachepublic void put(QueryKey queryKey, QueryResult queryResult)
QueryCachequeryResult with queryKey in this cacheput in interface QueryCachepublic QueryKey findQueryKeyById(java.util.UUID queryId)
QueryCachefindQueryKeyById in interface QueryCachepublic void invalidate(QueryKey queryKey)
QueryCachequeryKey.invalidate in interface QueryCachepublic void invalidate(java.lang.String typeName)
QueryCachetypeName.invalidate in interface QueryCachepublic void invalidate(java.util.Set<java.lang.String> typeNames)
QueryCachetypeNames.invalidate in interface QueryCachepublic QueryKey invalidate(java.util.UUID queryId)
QueryCachequeryKey.invalidate in interface QueryCachepublic void invalidateAll()
QueryCacheinvalidateAll in interface QueryCachepublic long size()
QueryCachesize in interface QueryCachepublic long getMaxSize()
QueryCachegetMaxSize in interface QueryCachepublic java.util.Map<QueryKey,QueryResult> asMap()
QueryCacheasMap in interface QueryCache