@Component(value="eclipselink_QueryCache") public class StandardQueryCache extends java.lang.Object implements QueryCache
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.cache.CacheManager |
cacheManager |
protected io.jmix.core.CacheOperations |
cacheOperations |
protected static org.slf4j.Logger |
log |
protected org.springframework.cache.Cache |
queries |
static java.lang.String |
QUERY_CACHE_NAME |
| Constructor and Description |
|---|
StandardQueryCache() |
| Modifier and Type | Method and Description |
|---|---|
QueryResult |
get(QueryKey queryKey)
Returns the query results associated with
queryKey in this cache |
protected void |
init() |
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. |
void |
invalidateAll()
Discards all queries results in the cache.
|
protected void |
invalidateByTypes(java.util.Set<java.lang.String> typeNames) |
void |
put(QueryKey queryKey,
QueryResult queryResult)
Associates
queryResult with queryKey in this cache |
long |
size()
Returns number of entries in this cache.
|
protected org.springframework.cache.Cache queries
@Autowired protected org.springframework.cache.CacheManager cacheManager
@Autowired protected io.jmix.core.CacheOperations cacheOperations
public static final java.lang.String QUERY_CACHE_NAME
protected static final org.slf4j.Logger log
@PostConstruct protected void init()
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 void invalidate(java.lang.String typeName)
QueryCachetypeName.invalidate in interface QueryCachepublic void invalidate(java.util.Set<java.lang.String> typeNames)
QueryCachetypeNames.invalidate in interface QueryCacheprotected void invalidateByTypes(java.util.Set<java.lang.String> typeNames)
public void invalidateAll()
QueryCacheinvalidateAll in interface QueryCachepublic long size()
QueryCachesize in interface QueryCache