Class AbstractSearchExpressionEvaluatorCache<V extends PrismValue,RV extends PrismObject,QK extends QueryKey,QR extends QueryResult>
- java.lang.Object
-
- com.evolveum.midpoint.util.caching.AbstractThreadLocalCache
-
- com.evolveum.midpoint.model.common.expression.evaluator.caching.AbstractSearchExpressionEvaluatorCache<V,RV,QK,QR>
-
- Direct Known Subclasses:
AssociationSearchExpressionEvaluatorCache
,DefaultSearchExpressionEvaluatorCache
public abstract class AbstractSearchExpressionEvaluatorCache<V extends PrismValue,RV extends PrismObject,QK extends QueryKey,QR extends QueryResult> extends AbstractThreadLocalCache
Cache for search expression-based evaluators. It needs to be customized in the following ways: - what's 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? V - type of cached result items RV - type of raw values that we are searching for QK, QR - customized query keys / values After refactoring, this class contains almost nothing ;) Consider removing it altogether.- Author:
- Pavol Mederly
-
-
Constructor Summary
Constructors Constructor Description AbstractSearchExpressionEvaluatorCache()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract QK
createQueryKey(Class<? extends ObjectType> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, PrismContext prismContext)
protected abstract QR
createQueryResult(List<V> resultList, List<RV> rawResultList)
String
description()
protected void
dumpContent(String threadName)
Object
getClientContextInformation()
List<V>
getQueryResult(Class<? extends ObjectType> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, PrismContext prismContext)
protected int
getSize()
<T extends ObjectType>
voidputQueryResult(Class<T> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, List<V> resultList, List<RV> 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
-
-
-
-
Method Detail
-
getClientContextInformation
public Object getClientContextInformation()
-
setClientContextInformation
public void setClientContextInformation(Object clientContextInformation)
-
getQueryResult
public List<V> getQueryResult(Class<? extends ObjectType> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, PrismContext prismContext)
-
putQueryResult
public <T extends ObjectType> void putQueryResult(Class<T> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, List<V> resultList, List<RV> rawResultList, PrismContext prismContext)
-
createQueryKey
protected abstract QK createQueryKey(Class<? extends ObjectType> type, ObjectQuery query, ObjectSearchStrategyType searchStrategy, ExpressionEvaluationContext params, PrismContext prismContext)
-
createQueryResult
protected abstract QR createQueryResult(List<V> resultList, List<RV> rawResultList)
-
description
public String description()
- Specified by:
description
in classAbstractThreadLocalCache
-
getSize
protected int getSize()
- Specified by:
getSize
in classAbstractThreadLocalCache
-
dumpContent
protected void dumpContent(String threadName)
- Specified by:
dumpContent
in classAbstractThreadLocalCache
-
-