@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)
QueryCache
queryKey
in this cacheget
in interface QueryCache
public void put(QueryKey queryKey, QueryResult queryResult)
QueryCache
queryResult
with queryKey
in this cacheput
in interface QueryCache
public QueryKey findQueryKeyById(java.util.UUID queryId)
QueryCache
findQueryKeyById
in interface QueryCache
public void invalidate(QueryKey queryKey)
QueryCache
queryKey
.invalidate
in interface QueryCache
public void invalidate(java.lang.String typeName)
QueryCache
typeName
.invalidate
in interface QueryCache
public void invalidate(java.util.Set<java.lang.String> typeNames)
QueryCache
typeNames
.invalidate
in interface QueryCache
public QueryKey invalidate(java.util.UUID queryId)
QueryCache
queryKey
.invalidate
in interface QueryCache
public void invalidateAll()
QueryCache
invalidateAll
in interface QueryCache
public long size()
QueryCache
size
in interface QueryCache
public long getMaxSize()
QueryCache
getMaxSize
in interface QueryCache
public java.util.Map<QueryKey,QueryResult> asMap()
QueryCache
asMap
in interface QueryCache