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 ofExpressionEvaluationContext
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
Constructors Constructor Description AbstractSearchExpressionEvaluatorCache()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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)
String
description()
protected void
dumpContent(String threadName)
Object
getClientContextInformation()
List<V>
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
-
-
-
-
Method Detail
-
getClientContextInformation
public Object getClientContextInformation()
-
setClientContextInformation
public void setClientContextInformation(Object clientContextInformation)
-
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
protected abstract QR createQueryResult(List<V> resultList, List<PrismObject<O>> 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
-
-