Class AbstractSearchExpressionEvaluatorCache<V extends PrismValue,O extends ObjectType,QK extends QueryKey,QR extends QueryResult<V>>
java.lang.Object
com.evolveum.midpoint.util.caching.AbstractThreadLocalCache
com.evolveum.midpoint.model.common.expression.evaluator.caching.AbstractSearchExpressionEvaluatorCache<V,O,QK,QR>
- Type Parameters:
V
- type of cached result itemsO
- type of raw values that we are searching forQK
- query keyQR
- query result After refactoring, this class contains almost nothing ;) Consider removing it altogether.
- Direct Known Subclasses:
AssociationSearchExpressionEvaluatorCache
public abstract class AbstractSearchExpressionEvaluatorCache<V extends PrismValue,O extends ObjectType,QK extends QueryKey,QR extends QueryResult<V>>
extends AbstractThreadLocalCache
Cache for search expression-based evaluators.
It needs to be customized in the following ways:
- what is in the query key besides basic data - namely, what parts of
ExpressionEvaluationContext
should
be part of the key?
- should we store anything in addition to the resulting list of values? E.g. shadow kind in case of `associationTargetSearch`
that is used for invalidation?-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract QK
createQueryKey
(Class<O> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, PrismContext prismContext) protected abstract QR
createQueryResult
(List<V> resultList, List<PrismObject<O>> rawResultList) protected void
dumpContent
(String threadName) getQueryResult
(Class<O> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, PrismContext prismContext) protected int
getSize()
void
putQueryResult
(Class<O> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, List<V> resultList, List<PrismObject<O>> rawResultList, PrismContext prismContext) void
setClientContextInformation
(Object clientContextInformation) Methods inherited from class com.evolveum.midpoint.util.caching.AbstractThreadLocalCache
debugDump, destroy, dumpContent, enter, exists, exit, getConfiguration, getConfiguration, getEntryCount, getTotalSize, isAvailable, registerHit, registerMiss, registerPass, setConfiguration, supportsObjectType, toString
-
Constructor Details
-
AbstractSearchExpressionEvaluatorCache
public AbstractSearchExpressionEvaluatorCache()
-
-
Method Details
-
getClientContextInformation
-
setClientContextInformation
-
getQueryResult
public List<V> getQueryResult(Class<O> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, PrismContext prismContext) -
putQueryResult
public void putQueryResult(Class<O> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, List<V> resultList, List<PrismObject<O>> rawResultList, PrismContext prismContext) -
createQueryKey
protected abstract QK createQueryKey(Class<O> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, PrismContext prismContext) -
createQueryResult
-
description
- Specified by:
description
in classAbstractThreadLocalCache
-
getSize
protected int getSize()- Specified by:
getSize
in classAbstractThreadLocalCache
-
dumpContent
- Specified by:
dumpContent
in classAbstractThreadLocalCache
-