Class StandardQueryCache
java.lang.Object
io.jmix.eclipselink.impl.entitycache.StandardQueryCache
- All Implemented Interfaces:
QueryCache
@Component("eclipselink_QueryCache")
public class StandardQueryCache
extends Object
implements QueryCache
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.cache.CacheManagerprotected CacheOperationsprotected static final org.slf4j.Loggerprotected org.springframework.cache.Cachestatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the query results associated withqueryKeyin this cacheprotected voidinit()voidinvalidate(String typeName) Discards cached query results for metaClass nametypeName.voidinvalidate(Set<String> typeNames) Discards cached query results for metaClass namestypeNames.voidDiscards all queries results in the cache.protected voidinvalidateByTypes(Set<String> typeNames) voidput(QueryKey queryKey, QueryResult queryResult) AssociatesqueryResultwithqueryKeyin this cachelongsize()Returns number of entries in this cache.
-
Field Details
-
queries
protected org.springframework.cache.Cache queries -
cacheManager
@Autowired protected org.springframework.cache.CacheManager cacheManager -
cacheOperations
-
QUERY_CACHE_NAME
- See Also:
-
log
protected static final org.slf4j.Logger log
-
-
Constructor Details
-
StandardQueryCache
public StandardQueryCache()
-
-
Method Details
-
init
@PostConstruct protected void init() -
get
Description copied from interface:QueryCacheReturns the query results associated withqueryKeyin this cache- Specified by:
getin interfaceQueryCache
-
put
Description copied from interface:QueryCacheAssociatesqueryResultwithqueryKeyin this cache- Specified by:
putin interfaceQueryCache
-
invalidate
Description copied from interface:QueryCacheDiscards cached query results for metaClass nametypeName.- Specified by:
invalidatein interfaceQueryCache
-
invalidate
Description copied from interface:QueryCacheDiscards cached query results for metaClass namestypeNames.- Specified by:
invalidatein interfaceQueryCache
-
invalidateByTypes
-
invalidateAll
public void invalidateAll()Description copied from interface:QueryCacheDiscards all queries results in the cache.- Specified by:
invalidateAllin interfaceQueryCache
-
size
public long size()Description copied from interface:QueryCacheReturns number of entries in this cache.- Specified by:
sizein interfaceQueryCache
-