@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)
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 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
protected void invalidateByTypes(java.util.Set<java.lang.String> typeNames)
public void invalidateAll()
QueryCache
invalidateAll
in interface QueryCache
public long size()
QueryCache
size
in interface QueryCache